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
[b]Question asked by visitor Ravi[/b]
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
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)
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.