How to identify in table an input (check-box) followed by a text in <td>?
I have to identify the path of check boxes in a row from a table using the text preceding them. The problem is that the text is inserted in a 'td'.
The code is following:
<tr class="bz_row_even">
<td align="center">
<input type="checkbox"
name="email-0-10"
value="1"
checked>
</td>
<td align="center">
<input type="checkbox"
name="email-1-10"
value="1"
checked>
</td>
<td align="center">
<input type="checkbox"
name="email-2-10"
value="1"
checked>
</td>
<td align="center">
<input type="checkbox"
name="email-3-10"
value="1"
checked>
</td>
<td>A new bug is created
</td>
</开发者_如何学编程tr></code></pre>
In this example I have 4 check-boxer for a row. My query should be with a count to check the check-boxes in turn.
Could somebody help me with the path of check-boxes?
Thank you in advance
If you don't use Se-IDE, this becomes much easier. Here I just add the path to a list, but could use get_attribute or similar on the element that is been used.
paths = []
for checkbox in range(se.get_css_count("css=#bz_row_even input"):
paths.append("css=#bz_row_even input[%d]" % checkbox)
Unless I completely misunderstand your question
精彩评论