How is it possible to locale Selenium WebElement that is next to certain link?
I have this kind of source code
<a href="/url.com" >
Link text
</a>
<ul>
<li class="dir">THIS LIST ELEMENT I WANT TO LOCATE
<ul>
<li>
If the url is not nessesary in locating, feel free to tell me better way! I have had no luck with counting elements, because amount of them varies based on mouse moves. I use Selenium Java.
Using xpath You can locate.
I assume that a and ul tags are siblings. If those are not siblings then also you can achieve that by modifying above xpath slightly.