ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
How To write script in QTP For Field Validation Example: 
password Field is accepting A range 8-20 characters 
only.How to write script?
 Question Submitted By :: Madhurasmitha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    7 Yes 3 No
Ganesh Kumar
 
  Re: 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
# 2
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 ?    1 Yes 1 No
Max
 
 
 
  Re: 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
# 3
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 ?    0 Yes 0 No
Uday
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is the syntax for regular expression in QTP? how to create user defined functions in QTP? MBT4
Could anyone please tell me one situation where you have used recovery scenarion in real time with an example?  3
Which object repository we use in real time and can we merge 2 object repostiory and how? HCL6
What are software testing metrics  3
What is the difference between functions and actions in QTP? Verizon3
What is throw object?  1
wt is the xtension of the QTP result view file?  4
I am automating a Java application. This application is developed using SWT. I am not able to get the GUI object. Even i tried with Java add-in. In tutorial it states SWT is not supported any idea. Anybody worked in such appln. My question is whether it is possible to record the GUI object of SWT appln. how it is possible.  1
Where you can store check point results?  2
what is the abbrivation of .mtr in action reposirtory? GE5
HI, Based On The Information Below Write A Data Driven test Script Edit Box 1 Should take Value From Num1 Column Edit Box 2 Should take Value From Num2 Column Click On Add Button, Get The Value Of Exp res Column, Get Value From Actual Result Edit Box , Compare Two Values, Write Pass / Fail Value Into Result Column Thanks In Advance... Kavitha Input.Xls Num1 Num2 Exp res Act res Result 10 30 40 40 Pass 50 40 90 90.5 - - - - - - - - - - - - - - - - UHG3
Maximum synchronizing time out in QTP Kanbay2
what is the test process followed for your project? Satyam1
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent  8
Q- what is the advantage of merging tool in QTP 9.2? TCS1
What is difference between QTP 8.2 Obect Repository and QTP 9.2 object Repository? Nokia1
waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??  3
What is object identification? Wipro2
What is Regular Expressions?  2
How can i check all the button that are enabled in a widnows based application ? What script should i write for this ?  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com