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

What is the function of Filter in QC . give with a real time example.

1 Answers   TCS,


What is difference between run time object and test object?

0 Answers  


Hi everybody, Can anybody tell me that how the QTP frameworks are implemented . I wanted to know with examples . Thanks in advance

2 Answers  


Explain about datafile/verification of date file when file is not available in local system?

0 Answers  


anyone can explian about types of "Triggere Events" in QTP

1 Answers  






what is the use of VIRTUAL OBJECTS? explain ?

4 Answers  


How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance

2 Answers   BirlaSoft,


how will check the links in multiple pages at a time

3 Answers  


Is it possible to call from one action to another action in qtp?

0 Answers  


How to count the no of objects in XML file(QTP)

1 Answers   IBM,


what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?

0 Answers  


how to get childobject from .net application. i tried but its showing child object count zero. but window has child objects.the following script i written... pls help me how to get. set parent=SwfWindow("winodw name") CheckObjectDescription parent, SwfButton Public Function CheckObjectDescription(parent, oDesc) Set oDesc = Description.Create() oDesc("micClass:").Value ="Swfbutton" Set children = parent.ChildObjects(oDesc) cntObj=children.count msgbox(cntObj) End function

1 Answers  


Categories