RE: How to get elements location ?

Answered

Iam new to selenium IDE ,
I have a dynamic grid containing 7 columns. The first and last column contains hyperlinks.  The first column hyperlink’s text are different but the hyper links of the last column contains the same text.
Now , I have written a code to search a hyper link by text and click on it. This code only works for the first column since the texts of those links are always different.
The problem is to write a code for the last column where the texts are always the same.

In the following code JID is the variable containing the text.

<tr>
<td>clickAndWait</td>
<td>Xpath=(//a[contains(text(),’${JID}’)])</td>
<td></td>
</tr>

I thought about searching the first column and get its location and then by that location moving forward towards the last link and then clicking on it.

I just wanted to do this …please help

geetakirshan Default Asked on October 3, 2014 in Software Testing.
Add Comment
3 Answers

HI Geeta,

Please go through the below link and let me know if you still face the issue.

http://www.toolsqa.com/selenium-webdriver/handling-tables-selenium-webdriver/

Best Regards,
Lakshay Sharma

Professor Answered on October 3, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.