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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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 ?    1 Yes 1 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 ?    0 Yes 0 No
Max
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How to open an application through scripting?  7
when do we write a script in qtp?(plz give me more then 2 reasons)  1
plz can any one send me what is Automation Testing Frameworks.. Thanks in advance  1
HOW TO HANDLE THE EARRORS WITHOUT USING RECOVERYSCNEORY? PLZ TELL ME IMMIDIATLY  1
Hi Frriends... I have one Query please give the apropriate ans. when we r working with web based application , the user loggedin page name is changed respect to the username ( Take a exp. Yahoomail.com) .When we use Datadriven test to this scenario ,each time the loggedin page name is changed ...then the script is fail.. at that time wat can do... please give the apropriate ans. Thanx in advance..  3
How to retrieve the data from database? Wipro5
how to create user defined functions in QTP? can any one expalin me with example.. Thanks in Advance for help  2
difference between multiple parameterization and data driven wizard in QTP?  1
What is the use of Regular expression?  4
How many type of status messages are there ..explain?  3
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp Logica-CMG1
How u execute test cases in manual testing? Accenture2
If u don't have any Knowledge on perticular application but they give that application to u for Testing ? Then How we wil move towards testing on that application? HP16
what are the different Frame Works in Quick Test Proffessional testing Wipro4
Can a function return a dictionary object? Semantic-Space1
WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?  2
In automation testing Can we retest virtual object in the application after getting new version from the developers, is there any property will change for that object or it won't.? Siemens1
How does Parameterization and Data-Driving relate to each other in QTP?  2
Hi This is tanya actually im facing problem in Qtp actully some time QTP doesnot recoznise the recorded object due to which script is going to fail.so can you tell me how we can handle this situation and i have another concerened issue is that at the time of run New errors comes every time so how we can handle this sitauation how we can add Recovery scenarios to the script.some time application runs successfully and some time it produces new error thats why i am facing lot of problem please give me the sugeestion as soon as possible.  2
Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this? IBM3
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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