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

Actually How do we use this Smart Identification Technology during Recording mode.

1 Answers  


I want to execute 1st row of the local sheet and 3rd row of the global sheet parellely. write script to execute

2 Answers   IBM,


how to tell about testing a website in interview using qtp?? what r the points to be covered mainly?

2 Answers  


How can i find out any "text's" coordinates in excel sheet For example: I want to know the coordinates of "F" Column in the excell sheet While recording when i clicked on F column it is showing the coordinate values 385,9 but with out recording how can i find out them Suppose i want to clik on "H" column writing the script like this Window("Book1").WinObject("Book1").Click (...........) Here I Dont know what (x y )values should i enter Please any one can help me?

1 Answers   Livetek,


How to create configuration scripts

1 Answers  






How smart identification works in qtp ?

0 Answers  


Can launch two instances of qtp on the same machine?

0 Answers  


Hai anyone please "Explain about Framework in QTP?"

6 Answers  


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

0 Answers  


HOW TO FIND WEBTABLE? HOW TO RETRIVE THE WEBTABLE VALUES? PLZ TELL ME THE PROCEDURE.

2 Answers   TCS,


How do we call Library Files(.vbs) in the Test Script Thanks in Advance...

6 Answers  


Why do we use text checkpoint as we can make use of the same in the standard check point?

3 Answers   IBM,


Categories