How To write script in QTP For Field Validation Example:
password Field is accepting A range 8-20 characters
only.How to write script?
Answer Posted / ganesh kumar
Dim strTextValue
strtextValue = Browser("Browser").Pge("Page").Frame
("Frame").webEdit("Password").GetRoProperty("value")
If strTextValue <8 Then
Reporter.ReportEvent micFail,"Check for the Feild
validation","The Feild is accepting Lesserthan
lowerBoundary value"
ElseIf strTextValue>20 Then
Reporter.ReportEvent micFail,"Check for the Feild
validation","The Feild is accepting Greater than
UpperBoundary value"
Else
Reporter.ReportEvent micFail,"Check for the Feild
validation","The Feild is not accepting lesserthan or
Greater than the Boundary value"
EndIF
| Is This Answer Correct ? | 14 Yes | 12 No |
Post New Answer View All Answers
whare exactly we have to use functions and sub routain
Can I change properties of a test object?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
what is review
What is ‘object spy’ and what is the function of object spy in qtp?
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?
Explain building blocks of the bpt framework ?
Which functionalities of QTP used in banking project? pls any say answer?
What are the 3 main stages involved in testing with qtp?
Can we use index on view?
What test you perform mostly? Regression or retesting in your testing process?
Is text area check point supports for web applications?
Is it possible to change the values of analog recording?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.