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
please any one can explain the keyword driven framework. with gmail example.
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
Explain about Test Fusion Report of QTP?
How do you create new test sets in td?
What are the advantages of qtp?
Tell me about your project? please help me how to tell about insurance project
Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
What are the different ways to invoke an application using QTP?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
Discuss quicktest professional environment?
Hi All, How to get repeated word in string . Thanks Balaji
How to create scenario selector
Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay