Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

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?

0 Answers   HSBC, T Mobile,


what the diffference between test data and test cases what is meant by object hierarchy in qtp

4 Answers   Virtusa,


How to use debug tools?

0 Answers  


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

1 Answers   HCL,


What are the most frequent errors you faced while executing your scripts?

1 Answers  


What are default add-ins in qtp?

14 Answers   Semantic Space,


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?

5 Answers   HP,


If I change the property value at runtime is it effect is object repository?

0 Answers  


What is the use of Regular expression?

5 Answers  


what is the difference between window command and dialog command

1 Answers  


What is the difference between two actions?

1 Answers   Wipro,


Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code

2 Answers  


Categories