Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I am using Selenium and PhantomJS as a driver for it. And during testing of a site I got stuck with getting a link url of a nonstandard link. More precisely all links are in js and links look like this:

HTML
<a data-item="xxx-SOME-GUID-xxx">Link Title Text</a>


So - it does not contain href attribute so I can not take it by accessing IWebElement attribute collection. From what is accessible I can see an event "click()", but it's return type is void.

If I click on the link I could check where it redirects by checking driver's url property, but then I miss the other links. Going back and forth seems to be rather slow approach, so would prefer to avoid that if possible.

Any suggestions for the problem?

Thanks in advance!

BR,
M
Posted
Updated 29-Dec-15 2:59am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900