<table id="versionId" class="displayTable" cellspacing="0" cellpadding="0" rules="groups" style="width:100%;border-right:1px solid #DFDFDF;border-left:1px solid #DFDFDF;">
<caption class="displayCaption">
<thead>
<tbody>
<tr class="rowOdd">
<td style="width:1%">
<td style="width:15%;">
<span class="font">1</span>
</td>
<td style="width:12%">
<td style="width:10%">
<td style="width:10%">
<td style="width:13%">
<td style="width:18%">
=======
any way i can get that 1 and print out?
i tried out this .//*[@id='versionId']/tbody/tr/td[2]/span/text():
System.out.println(driver.findElement(By.xpath(".//*[@id='versionId']/tbody/tr/td[2]/span/text()")));
it return me with error:
The given selector .//[@id='versionId']/tbody/tr/td[2]/span/text() is either invalid or does not result in a WebElement. The following error occurred: InvalidSelectorError: The result of the xpath expression ".//[@id='versionId']/tbody/tr/td[2]/span/text()" is: [object XrayWrapper [object Text]]. It should be an element.
HELP D:
//*