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
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
Can we run multiple QTP scripts one after the other without manual intervention? How?
i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
what is the latest version of QTP? Main difference between 9.2 and 10 version
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B
Can you list some technologies that support qtp?
Output values? i want a practical example
Write a script to verify font style and color of a windows object using descriptive programming
how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me
QTP script is not working on other's machine..
Can we write winrunner language i.e TSL in QTP tool?
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
What are the different types of recording modes?