Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click links with same name in a webtable?
#1
Not Solved
Hi,
I have a web portal. In that there is one table of 4 rows and 5 coulmns. The last column contains links. These links are of same name. There is not html id for those links. Only distinguishing factor is index property(ordinal identifier). But I am not sure how to use that.

I would like to read the rows and columns first and have to click the links as I wish. Is this possible or is there any other way.

Please help me in this. Thanks in advance!!



Regards
QTPlearner


Attached Files Image(s)
   
Reply
#2
Not Solved
Hi,

U have 4 rows and 5 columns and u want to click the link on last column.
To Click a particular link u first read the data from coulmn 1 or 2 for a particular row, if this is what u r looking for in this table and get the row id and click the link on that particular row id.

Let me know in any queries.

Regards,
Sankalp
Reply
#3
Not Solved
Hi Sankalp,
How to get the row id?? is that a html id?
Can you please give an example so that it will be easy for me to understand? Thanks!

Regards
QTPlearner
Reply
#4
Not Solved
Hi,
No, html id and row id are different. U have to navigate through all rows using for loop.
Code:
For i=1 to rowcount
if <condition to check the required data on particular cell of table>
set objLink=Browser().page().webtable().childitem(i,5)-->get the link to Click
objLink.Click
msgBox("Row id for this link was"&i)
Next


This is a rough code..u can get a feel of what u need to do.
Regards,
Sankalp
Reply
#5
Not Solved
You can also use the index function, which correspond to the link order in the object. Index 1 = link 1, Index 2 = link 2, etc. However, this will result in clicking the wrong item if the "correct" links aren't always the same index item.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Link in a webtable in a webtable Soulwalker 1 2,691 07-19-2017, 01:44 PM
Last Post: Ankur
  How to click on all links dynamically in UFT? Rohan 9 17,883 02-25-2016, 10:42 AM
Last Post: vinod123
  I want to click on all the links in the webtable. These links are nothing but some co abhideshpande001 0 2,560 07-22-2015, 09:36 AM
Last Post: abhideshpande001
  Unable to click on WebButton in WebTable srach84 1 2,896 02-09-2015, 09:07 PM
Last Post: arpan
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,626 06-13-2014, 04:27 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)