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 |
Explain the types of object repository?
where the object repository is located?how to choose the object repository as shared or action object repositories?
what is exact difference between smoke and sanity testing?
can anyone explain about the Descriptive programming in detail. I mean how to use in the script.
Tell me the QTP Advantages and Disadvatages ?
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??
What is the use of "Define new test object" in QTP 9.1 When should we use? Explain?
how can i prepare for QTP(8.2) to face interview ? give over view details?
Mention the test steps of qtp.
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
can u give one scenario for for PopWindow Exception & write Code for that?
write script to read and write data from file ?