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   SiteMap shows list of All Categories in this site.
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 CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me
sample script for this where there is some condition. like
if "text" THEN msgbox()  else   endif
 Question Submitted By :: Deepak Singh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 1
textProp=Browser("").Page().WebEdit().GetROProperties
("text")
If textProp<>"password" Then
msgbox "Enter Proper Password"
End If
 
Is This Answer Correct ?    3 Yes 3 No
Sdf
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 2
x=inputbox("text")
mdgnox x
if (x=true) then 
msgbox "pass"
else 
msgbox "fail"
 
Is This Answer Correct ?    1 Yes 2 No
Ramakrishna
 
 
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 3
Using Object Spy find where u get the value for the 
textbox,  i.e in "text" property or "Value" property...
  
use "text" or "value" accordingly Getroproperty("text") or 
Getroproperty("value")

If u want to chk whether the value in the text box 
is "sunday" then....

a=Browser().page().frame().webedit().getroproperty("value")
if a=="sunday" then
msgbox ("displayed message is sunday")
else
msgbox ("msg is not sunday")
end if
 
Is This Answer Correct ?    1 Yes 1 No
Pooja
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 4
a=inputbox("text")
msgbox a
if (a=true) then 
msgbox "pass"
else 
msgbox "fail"
 
Is This Answer Correct ?    0 Yes 1 No
Gavaskar Reddy
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 5
if it is a windows based application, then it will be in
this way :
x= Window("Windowname").winedit("editboxname").Getvisibletext
msgbox x                (or)

if it is webbased application then :
x =
Browser("Browsername").Page("Pagename").Webedit("Webeditboxname").GetROProperty("value")
msgbox x
 
Is This Answer Correct ?    3 Yes 0 No
Shiva Kumar Dokka
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 6
val=window("customer").edit("").GetTOProperty("text")

msgbox val

if (val=true) then 
msgbox "pass"
else 
msgbox "fail"
 
Is This Answer Correct ?    0 Yes 0 No
Sree
 
  Re: HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
Answer
# 7
systemutil.Run "iexplore.exe", "newtours.demoaut.com"

getValue=Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").GetROProperty("name")
msgbox getValue

If name<>userName Then
	Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "thirumala"
	Else
	Reporter.ReportEvent micfail, "check edit box existancy", "Edit box is not existed"
End If
 
Is This Answer Correct ?    0 Yes 0 No
A.thirumalareddy@gmail.com
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How to handle "Java Runtime error" popup window in the web application ? Sometimes the application throws the error repeatedly... Is there any browser setting available to disable the error ? TCS2
what properties do use to identify a browser and page while using descriptive programming? TCS3
HOW to invoke any recorded script in QTP with out using RECORD & PLAYBACK CONCEPT?  1
For example one window is there the window contain some of Check boxes but my question is how many check boxes are there particular window? Please solve the problem gi_raju@rediffmail.com ippaliraju@yahoo.co.in  3
When and why do you use "OPTION EXPLICIT" in VB Script. Is there any online help or something to learn the script for Beginners?  5
If u r using descriptive programming to identify the object where do u write the script for those objects? do u write it in the expertview? plz do answer its urgent thanks advance.  2
what we do after completion of functional and regression testing  2
How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?  1
where is the bitmap checkpoint be saved  3
WHAT AREV THE STEPS BETWEEN TEST cASE AND Script generation?  1
Hi all, can anyone tell me the challenges u faced while using qtp?  1
how to change the properties of object during run time . plz give the code using flight reservation  1
Hi Friends ,I want to Know name of the Site for the QTP Help and the Best Book through that I can start the QTP Practice here also whare can I download the QTP Users Guide I search I was Unable .  2
Hello Guys, Can anybody Explain me about Automation framework?? and how can we prepareAutomation Framework using QTP Sapient3
What is TD plugin? For what purpose they are used . Ineed to connect QC9.2 with QTP 9.2 . Need to run some scripts IN QTP having the QC connectivity. Pls explain in detailed step Thanks in advnece HCL1
What r steps to migrate from Manual testing to QTP?(IN BOTH WEB BASED AND WINDOWS APP) Wipro1
how qtp identifies objects of application. Intel5
How can I pass values from one action to another in QTP ? Ordain-Solutions6
what is the difference between action and function BirlaSoft8
Hi Friends...this is surendra..recently i joined automation team ...Please send me some documents regarding VB script ...and where can i learn VB script... This is My mail id: surendra.mamilla@gmail.com... please send to my mail.... Thanx in advance surendra.  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