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
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 |
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 |
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 |
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 |
a=inputbox("text")
msgbox a
if (a=true) then
msgbox "pass"
else
msgbox "fail"
Is This Answer Correct ? | 4 Yes | 11 No |
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 |
Answer / ramakrishna
x=inputbox("text")
mdgnox x
if (x=true) then
msgbox "pass"
else
msgbox "fail"
Is This Answer Correct ? | 7 Yes | 21 No |
What is the function of Filter in QC . give with a real time example.
What is difference between run time object and test object?
Hi everybody, Can anybody tell me that how the QTP frameworks are implemented . I wanted to know with examples . Thanks in advance
Explain about datafile/verification of date file when file is not available in local system?
anyone can explian about types of "Triggere Events" in QTP
what is the use of VIRTUAL OBJECTS? explain ?
How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance
how will check the links in multiple pages at a time
Is it possible to call from one action to another action in qtp?
How to count the no of objects in XML file(QTP)
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?
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