Quality Testing

Quality is delighting customers

how we wiill count number of links in a page by the use of selenium ide?

which command is used to store the links and count the links

Views: 606

Reply to This

Replies to This Discussion

Hi Kishore,

I hope below mentioned link will help you to understand how to achieve the count of Links on the page:

IDE: http://thiyagarajan.wordpress.com/2012/08/24/get-number-of-links-in...

RC: http://seleniumone-by-arun.blogspot.in/2013/05/144-using-getxpathco...

P.S That was in Java with eclipse.:)

when we search a selenium on the google .how many links with the word selenium will open and how we will count those links and? which command is used to count the links?

Hi Kishore,

1. 'StoreAllLinks' command will store all links in a Array

2. And Take ArrayCount which is Number of links in webpage.

Regards

Vishal D,

Or you can use below mentioned Code as well:

<tr>
<td>open</td>
<td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>window.document.getElementsByTagName(&quot;a&quot;).length</td>
<td>totallinks</td>
</tr>
<tr>
<td>echo</td>
<td>${totallinks}</td>
<td></td>
</tr>

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service