I am attempting to retrieve a property of cells within a table.
<table id="m-103" class="m-row" cellspacing="0">
<a name="2"></a>
<table id="m-108" class="m-row " cellspacing="0">
<a name="3"></a>
<table id="m-191" class="m-row " cellspacing="0">
<tbody>
<tr>
<td class="m-st">
<td class="m-jk m-N">
</td>
</td>
</tr>
</tbody>
</table>
Here is the xpath I currently have
.//*[@class='m-row']/tbody/tr/td[@class='m-jk']
However, this only accesses the cells in the first table.
I am specifically looking for the m-N class value. Not every table contains the m-N value. Is there a method to only examine tables that include "m-N" or do I need to individually inspect each one? I am only aware of navigating to specific paths, so I am unsure how to iterate through each table.
How can I retrieve the second class value "m-N"? Every CSS or xpath I have tried has been unsuccessful, and they are all specific to a predefined table.
I came across a solution where the person was using jQuery. Should I consider learning and utilizing jQuery in addition to Ruby and Selenium?
How to get the second class name from element?
There are numerous tables, but I only showcased 3 for this example. Additionally, the quantity of tables and cells varies frequently.