I need to read one or two words from the web page. These two words will be displayed top right handside of the web page.
Please suggest me with the syntax or code !
Are the words links, webelements or static text on the frame?
Does QTP recognize them seperately, work with its parent object and use childobject or getroproperty
-- Here to Learn and share ---
Thanks for your reply.
It is showing with WebElement. Can you please elaborate the details and give examples.
Is that dynamic content?
Easiest way is to add the object into the repository and use getroproperty.
but if it is dynamic content you may have to use regular expression to make it work.
Thank You, Jonty.
I have to use the Dynamic and not using the Repository.
Below is the code that I have. I have checked by putting the for loop to findout the text which is displaying on the web page.
But I am not able to find this. Can you tell how I should use the regular expression with this ?
Set oBrowser = Description.Create
oBrowser("MicClass").Value = "Browser"
Set oPage = Description.Create
oPage("MicClass").Value = "Page"
Set desc = Description.Create
Desc ("MicClass").value= "Web Table"
Set elements = Browser(oBrowser).Page(oPage).ChildObjects(Desc)
For i = 1 to elements1.count
x = Browser(oBrowser).Page(oPage).
WebElement(elements1,"index:=" & i ).
I am using the Descriptive Programming. Regarding the Content, I have to capture just once in the flow from the page.
Well it would depend on how these are displayed on the web page. You should attach the HTML source code of the web page
Tarun Buy the NEW QTP Descriptive Programming Unplugged Book ** Download QTP Unplugged 2nd Edition eBook for FREE **
As I mentioned, It is displaying as WebElement and it is not a link to click.
It displays as text at the top right handside of the web page.
Please suggest me and let me know if you need any details.
Doesn't make a difference. You should attach source code for us to be able to provide you some direction