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
What is difference between Recording time object identification and Run time (Execution) time.
How can you write the scripts that operate on different objects depending on run-time information?
How you calling actions in qtp?
What is quicktest professional window?
how to find that tools work well with your existing system?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
any body can you help me what is the script to automate an comand promt
What is the qtp testing process?
What is QTP and the use of QTP in TD?
can i compare two databases using QTP ?
I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2
How do you convert manual test cases to automated test cases?
Object repositories types, which and when to use?
Where we use data driver in qtp?
How can you exit from an action?