I started learning Xpath somedays ago, and it is not clear for me that this technology is capable of doing that:
---> I have a table which has a lot of row, the row always contains an img with a clickable href on it
<a href="thread.php?judgelock=1&threadid=134389">
<img src="http://www.xxxxx.com/icons_wbb/icon12.gif" alt="Judge" title="Open to Judge" border=0>
</a>
---> I use now this to get the href:
(//img[@alt='Open'])[${i}]
where i is the position in the html (1- first, 2- second....)
---> i want only to select this href, when has a sibling with the specific value (SPECIFIC_USER):
<b>Elemezte: SPECIFIC_USER</b>
OR HAS A Sibling with the given child (SPECIFIC USER):
<a href="profile.php?username=SPECIFIC_USER">SPECIFIC_USER</a></b>
So i do not know is it possible with XPATH or only with JavaScript, I copied the html source one of the given rows--->
<tr align="center">
<td class="tableb"></td>
<td class="tablea" style="width:80%" align="left"><span class="normalfont">
<a href="thread.php?threadid=134389">[2013.04.28]</a>
<a href="thread.php?judgelock=1&threadid=134389">
<img src="http://www.xxxxx.com/icons_wbb/icon12.gif" alt="Open to Judge" title="Open to Judge" border=0>
</a>
<b>Elemezte: SPECIFIC_USER</b>
</span><span class="smallfont">
</span></td>
<td class="tableb">
<span class="normalfont">
<a href="javascript:who(134389)">7</a>
</span>
</td>
<td class="tablea" style="width:20%"><span class="normalfont">
<a href="profile.php?username=SPECIFIC_USER">Clickbox</a>
</span></td>
<td class="tableb"><span class="normalfont">58</span></td>
<td class="tablea" nowrap="nowrap"> </td>
<td class="tableb" align="left"><table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr align="right" class="tableb_fc">
<td align="right" nowrap="nowrap"><span class="smallfont"><b>Ma</b>, <span class="time">11:15</span><br />
írta:
<b>
<a href="profile.php?username=SPECIFIC_USER">SPECIFIC_USER</a></b>
</span></td>
</tr>
</table></td>
</tr>