Currently, I am using Selenium Webdriver in JS to scrape data from a website. My goal is to determine the number of <tr>
tags that contain exactly three children.
<tr>
<td>One</td>
<td>Two</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
</tr>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
</tr>
The end result: There are 2 tags containing only three child nodes of <td>
.
I'm looking to create an xPath expression for this task but need some guidance. Can someone assist me with this? Thank you!