Want to verify the location of new tab opened

18 views
Skip to first unread message

Subbu

unread,
Jun 4, 2012, 9:14:19 AM6/4/12
to Selenium Users, smart...@gmail.com
Here is the code

<div id="footerSponsors">
<h2>Official Club Sponsors</h2>
<a target="_blank" href="http://www.pepsi.co.uk/">
<img alt="pepsi" src="/i/gamers/site/logopepsi.png">
</a>
<a target="_blank" href="http://www.playdota.com">
<img alt="Samsung" src="/i/gamers/site/logoplaydota.png">
</a>
</div>

Could some 1 help me as want to verify the location as and when i
click on the images it does open a new tab

I tried with the css path and both have the same css path

Guys plz help me with this 1 :)

Thanks
Subbu

Brian Goad

unread,
Jun 7, 2012, 5:08:50 PM6/7/12
to Selenium Users
CSS implements psuedo-classes that you can use:

css=div#footerSponsors a:first-of-type
css=div#footerSponsors a:nth-of-type(2)
css=div#footerSponsors a:last-of-type

http://www.w3.org/TR/selectors/

Brian
Reply all
Reply to author
Forward
0 new messages