I am trying to get rows of information for a user using Selenium and xpaths. I am able to get the rows using the following code:
String xpath = "//tbody[contains(@class,'svelte-abc')]//tr";
List<WebElement> elements = webDriver.findElements(By.xpath(xpath));
What I am not sure is how to then parse the individual elements (TD's) for the row, e.g. the first one is a name, the second is email address.
The html is:
<table class="svelte-abc">
<thead>
.....
</thead>
<tbody>
<tr class="svelte-abc">
<td class="def">
<div class="ace">
<img ... >
</div>
</td>
<td class="def">A Person</td>
<td class="def">email@address.com</td>
</tr>
</tbody>