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 |
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
what the diffference between test data and test cases what is meant by object hierarchy in qtp
How to use debug tools?
According to use, how virtual object is different from object spy? If Qtp is not learning a sub-menues. What should we done? how would we manage on the expert view too? alkaa.dugaal@gmail.com
What are the most frequent errors you faced while executing your scripts?
What are default add-ins in qtp?
1.In VB Script 100 lines Script. How can check the Syntax errors? 2. Write a VB Script for X = India/Srilanka/Australia/England/South Africa.I need the Output Country wise? [ 1st Msgbox India , 2nd Msgbox Srilanka] ---- 3. How can Choose these test cases to be automated?
If I change the property value at runtime is it effect is object repository?
What is the use of Regular expression?
what is the difference between window command and dialog command
What is the difference between two actions?
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code