-
Retrieve data from webpage
How can I retrieve text (data) from a web page to QTP Data Table.
(All the text present in page are identified as web elements With diff title i dont want to add all the elements . I want to retriev the text line by line & put the same into dataTable) Any script which may help me out
Question asked by visitor Ravi
-
Expert Member
Re: Retrieve data from webpage
hai friend,
If you need top retrieve current text please use get RO property and save it to the datatable
for ex:
text=Browser("B").Page("P").WebEdit("E").GetRoProperty("text")
Thanks
Deepa
-
Expert Member
Re: Retrieve data from webpage
In most web page, texts and/or information are listed in webtable - row & col. Therefore, the effective way is to loop through the table and get the text.
Example,
1) get your datable rowcount
2) use loop
then use the below to save text to your variable or write to your resource.
myText = browser("b").Page("p").WebTable("t").GetCellData(r,c)
Last edited by learqtptesting; 05-29-2009 at 10:32 AM.
-
Junior Member
Re: Retrieve data from webpage
1.by applying output parameter check point on that object.
2.by applying GetRoProperty method on that object (or)
3.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules