How To write script in QTP For Field Validation Example:
password Field is accepting A range 8-20 characters
only.How to write script?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / max
Replace micFail with micPass in Ganesh Kumar's Answer.
(See below the last part of his answer, ... now modified)
Else
Reporter.ReportEvent micPass,"Check for the Feild
validation","The Feild is not accepting lesserthan or
Greater than the Boundary value"
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / uday
here the question is how to find the max and min. lengths
the webedit accepts?
To find the max length of the web edit, try with "max
length" property.
temp=browser("Browser").Page("Page").WebEdit("username").GetROProperty("max
length"). It works.
I am not sure about the min. legth.
Thanks,
Uday.
Is This Answer Correct ? | 5 Yes | 4 No |
How to handle dynamic objects in quicktest professional (qtp)?
User defined function in QTP
Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to use descriptive.create ()
What are parameterizing tests?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
How QTP integrate with application?
What is synchronization point in QTP?
In QTP , Test Director combination . what is the role of Test Director? How QTP Launching QTP in T.D ? If it is Winrunner possible. but QTP How it is possible?
Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript Thanks in advance
How to use Regular Expressions in QTP? give an example.
10 Answers ABC, Accenture, Ordain Solutions, SCL,
In QTP while testing 3 tier application, It is Java Based Application developed using Java, servelets and JDBC etc... and It is a Web based Application.. which Add-In do we need to select while testing ...Java or Web Add-In
how can u put synchronization point in qtp,wat is exactly synchroniztion why we use it wat is benifit in qtp
13 Answers College School Exams Tests, Mind Tree,