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

Answers were Sorted based on User's Feedback



HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / shiva kumar dokka

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 ?    29 Yes 8 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / pooja

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 ?    20 Yes 8 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / a.thirumalareddy@gmail.com

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 ?    9 Yes 2 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / sree

val=window("customer").edit("").GetTOProperty("text")

msgbox val

if (val=true) then
msgbox "pass"
else
msgbox "fail"

Is This Answer Correct ?    10 Yes 5 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / gavaskar reddy

a=inputbox("text")
msgbox a
if (a=true) then
msgbox "pass"
else
msgbox "fail"

Is This Answer Correct ?    4 Yes 11 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / sdf

textProp=Browser("").Page().WebEdit().GetROProperties
("text")
If textProp<>"password" Then
msgbox "Enter Proper Password"
End If

Is This Answer Correct ?    11 Yes 19 No

HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is ..

Answer / ramakrishna

x=inputbox("text")
mdgnox x
if (x=true) then
msgbox "pass"
else
msgbox "fail"

Is This Answer Correct ?    7 Yes 21 No

Post New Answer

More QTP Interview Questions

Explain the types of object repository?

0 Answers  


where the object repository is located?how to choose the object repository as shared or action object repositories?

4 Answers   Datamatics,


what is exact difference between smoke and sanity testing?

6 Answers   Satyam,


can anyone explain about the Descriptive programming in detail. I mean how to use in the script.

1 Answers  


Tell me the QTP Advantages and Disadvatages ?

6 Answers   Accenture, CTS, GE,






Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??

1 Answers  


What is the use of "Define new test object" in QTP 9.1 When should we use? Explain?

4 Answers  


how can i prepare for QTP(8.2) to face interview ? give over view details?

52 Answers  


Mention the test steps of qtp.

0 Answers  


Hai Friends this is Rajesh , Is there any Site or Blog that Video tutorials of Qtp that can be free downloadable to Pc. Friends if any body know that site or blog please send me because i'm really in need for that because i cannot affordMoney in learning Course in Institutes due to Financial Problem . So please Forward that Site or Blog which provides Downloadable Video Tutorials in Free to PC , As My Friend is having PC thru that I'm planning to learn. So Kindly help me Friends if you are aware of that Site/Blog

2 Answers  


can u give one scenario for for PopWindow Exception & write Code for that?

2 Answers   Cap Gemini,


write script to read and write data from file ?

2 Answers   HealthAsyst,


Categories