Hello I'm new to selinium ide and xpath
thing, that's why I need help regarding this one. I need to click some links on a website i can make it work in 1 link I don't know how it will search and click the other link because it has different number and post title. The link look like this one.
http://imageshack.com/a/img27/328/zv17.png
<a href="/sample/15151-hey-you">post</a>
<a href="/sample/142151-im-okay">post</a>
<a href="/sample/512512-thats-fine">post</a>
I use this xpath and it works on first link
//div[@id='main']/ul[2]/li[1][@class='notification-posted']/a[2]
What is the right xpath that will click 1 link and the preceding links
please help me with this one
Edit
Thank you so much your first code it works but not the second one. but every post in ul is important, your code is working on the first post in ul.
<h5>20 seconds ago</h5>
<ul>
<li class="notification-posted">
<img height="15" alt="" src="/assets/images/icons/notification-posted.png" />
<a href="/account/54351-wews">wews</a>
send new
<a href="/news/53235">post</a> <!--//li[@class='notification-posted'][1]/a[2]-->
</li>
</ul>
<h5>3 minutes ago</h5>
<ul>
<li class="notification-posted">
<img height="15" alt="" src="/assets/images/icons/notification-posted.png" />
<a href="/account/632323-yokol">yokol</a>
submitted a new
<a href="/news/253129-loss">post</a> <!--//li[@class='notification-posted'][2]/a[2]-->
</li>
</ul>
<h5>4 minutes ago</h5>
<ul/>
<h3>6 minutes ago</h3>
<ul/>
<h5>7 minutes ago</h5>
<ul>
<h2>8 minutes ago</h2>
<ul />
<li class="notification-posted" />
<li class="notification-posted" />
<li class="notification-posted" />
<li class="notification-posted" />
<li class="notification-posted" />
<img height="15" alt="" src="/assets/images/icons/notification-posted.png" />
<a href="/account/153316-problem">hey</a>
send new
<a href="/news/25151-helloworld">post</a> <!--***Problem was here***-->
</ul>
that should be
//li[@class='notification-posted'][6]/a[2]
right? but it parse other link. thank you for your answer.