I am using getFirstByXPath on a HtmlTableRow with HtmlUnit, but it does not work properly.
If i log the HtmlTableRow asXml()
<tr class="odd">
<td class="picColumn">
<img src="xyz.jpg"/>
</td>
<td>
Half Day Tour to the Rhine - Halbtages-Ausflug zum Rhein
</td>
<td>
<b>
Frankfurt am Main
</b>
<br/>
ETS Gmbh & Co. KG
</td>
<td class="dateColumn">
01.04.2016
<br/>
15:15 Uhr
</td>
<td>
Ticket
</a>
</td>
</tr>
Then I am trying to access different values with row.getFirstByXPath(xpath);
which is only in following case fine: row.getFirstByXPath("//td[@class='dateColumn']");
. If I try to access the second column with row.getFirstByXPath("//td[2]");
my result is null. What am I doing wrong?
Thank you!