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...


Hello,

Can we capture only the labels of the web page in the
object repository. If yes, then how.

Actually my scenario is:
I have to capture all the label of mercury site
http://newtours.mercuryinteractive.com/tour/mercurypurchase.
php.
and want to copy all these labels in the notepad.

So,please help me how to do this all.


Thanks in advance,
Gaytri

Answers were Sorted based on User's Feedback



Hello, Can we capture only the labels of the web page in the object repository. If yes, then ho..

Answer / chaitu.c

This is process of the above asked question
step1 QTP Tool put in Record mode after that
step2 Double click on the internet explore
Step3 enter the web site
step4 after enter the we site stop the recoreding in QTP
after you will get the following lines( 2,3,5,8)of code in
QTP

Line: 1 Dim a,b
Line: 2 Window("Program Manager").WinListView
("SysListView32").Activate "Internet Explorer"
Line: 3 Browser("Browser").Page("Page").Sync
Line: 4 b = Inputbox("Enter the Site")
Line: 5 Browser("Browser").Navigate b
Line: 6 a = Browser("Browser").Page("ALL
Interview .com ::").GetROProperty("url")
Line: 7 msgbox a
Line: 8 Browser("Browser").Page("ALL
Interview .com ::").Sync
'Create the Notepad file and Save the url in that
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("D:\Documents and
Settings\Administrator.SEERVER\Desktop\chaitu.txt", True)
MyFile.WriteLine(a)
MyFile.Close

Is This Answer Correct ?    0 Yes 0 No

Hello, Can we capture only the labels of the web page in the object repository. If yes, then ho..

Answer / chaitu.c

Browser("Browser").Page("Welcome: Mercury Tours").WebEdit
("userName").Set "chaitanyakumar2005"
a = Browser("Browser").Page("Welcome: Mercury
Tours").WebEdit("userName").GetROProperty("name")
msgbox a
Browser("Browser").Page("Welcome: Mercury Tours").WebEdit
("password").SetSecure "462974ae67a58c7d26974858f8a5b00fa630
"

Is This Answer Correct ?    0 Yes 1 No

Hello, Can we capture only the labels of the web page in the object repository. If yes, then ho..

Answer / chaitu

Line: 1 Set a = Browser("Browser").Page
("Page").StaticLabeltext

Line: 2 msgbox a

Step:3
'Create the Notepad file and Save the url in that

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("D:\Documents and
Settings\Administrator.SEERVER\Desktop\chaitu.txt", True)
MyFile.WriteLine(a)
MyFile.Close

Is This Answer Correct ?    0 Yes 1 No

Hello, Can we capture only the labels of the web page in the object repository. If yes, then ho..

Answer / guest

Good Question.......

here i used regular expressions concept with descriptive
prgming...Rough idea given to u...surely this approach can
work out...

Set opage=browser("Gmail: Email from Google").Page("Gmail:
Email from Google")
Set childobjdes = Description.Create()
childobjdes("mic class").value="Web Element"
childobjdes("html tag").value=".*[A-Za-z0-9].*"
childobjdes("outer text").value =".*[A-Za-z0-9].*"
set allobj = opage.ChildObjects(childobjdes)
msgbox allobj.count
For i=1 to allobj.count-1
text=text&allobj(i).getroproperty("outer text")
Next
msgbox text

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

In QTP, What is Global action and Local action?

0 Answers   Virtusa,


Define QTP ?

10 Answers   TCS,


what is database check point, how will you parameterize the database from seperate data table?

2 Answers   JPMorgan Chase,


Give me diffrent script in QTP for Webpage(Java and .Net),WindowsBased Applications,Java application,.Net application...

2 Answers   TCS, Virtusa,


What is a Patch in QTP?

0 Answers  


what are the disadvantages of qtp? can linux support qtp9.2? how could get web address throu vbscript?

6 Answers   Quintegra,


what is the extension for the test version of the script?

5 Answers   TCS,


Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?

1 Answers  


I m trying to automate one vb desktop application in that there is vblist vbcombobox many other vb tools are there ,when i m trying to find some unique property to identify the object (take example of vbcombobox ) I cannot find any unique property, all the combobox belong to same nativeclass same name no ids are available ,only the distinct property is there x and y coordinates so i m using some code like this "vbbutton "nativeclass:=ThunderRT6CommandButton","x:=304","y :=443").exist(2)" but i dont find them reliable .Can anyone suggest me some other way to identify those objects with some unique property or is there any way to register our own property .I m using descriptive programming to write the code .Thanks in advance

6 Answers   Cimcon,


write a test script in QTP to test the text that written in an image(i.e jpg)of a web page???

0 Answers  


CAN I CALL A FUNCTION IN ACTION.IF YES PLEASE HELP ME

2 Answers   TCS,


If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?

3 Answers   CTS,


Categories