Note: I'm not looking for a parent of an element. I'm looking for an element that contains other elements within it.
I’m using Rails 4.2.7 and I'm using Nokogiri to parse HTMl documents. I want to find the table in my document whose first row (first tr element) has at least one th element. How do I write a CSS selector for that? Note that I only want to select the table, not the th elements themselves. Here is an example of the table I would hope to select from within the document
<table>
<tbody>
<tr>
<th>Header 1</th>
</tr>
<tr>
<td>Other data</td>
</tr>
…
</tbody>
</table>