Micro Focus QTP (UFT) Forums
Getting links from a cell - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Getting links from a cell (/Thread-Getting-links-from-a-cell)



Getting links from a cell - bistritapcv - 04-19-2013

I have a mutli-page tabular (r x 4) report that looks like this

uid first last email
jsmith John Smith jsmith@yahoo.com
bjones Bob Jones bjones@yahoo.com
...
...
1 2 3


The 1 2 3 are in the first cell of the last row and they are links to the
page numbers. Depending on pages it could be more or less, like
1 2 3 4 or 1 2 or 1 2 3 4 5 6. Each is a link except the current page
number.

I want to go through all the uids. I can get the first page but am not sure
how to figure out how to click on the appropriate page number. I can get the last cell (rows,1) with the pages in it but how can I figure out the link for the next page? (Hope this makes sense)


RE: Getting links from a cell - basanth27 - 04-19-2013

What is it, a link object within the cell? Spy on the link 1 2 3 objects and check what type of objects they have set. Once you know, you can then probably regular expression a property and click on the right page number.
If you can put up the code that would help.


RE: Getting links from a cell - siddheshbhavasar - 03-29-2016

**** I have come up with following code, Please suggest will it work*********

set objtable= browser("index:=0").Page("index:=0").WebTable("innertext:=table")

rows = objTable.rowcount

objlink = objTable.GetCellData(rows,1)

for i = 0 to Ubound(objlink)

set objTemp = objtable.childitem(rows,1,"Link",i)
objTemp.click

next