You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to find a <td> from table, from given panel by using xpath and chaining find_by_* methods.
<div id="main">
<div class="panel">
<div class="heading">Table A</div>
<table>
<tr><td>Row 1</td><td>Value 1</td></tr>
</table>
</div>
<div class="panel">
<div class="heading">Table B</div>
<table>
<tr><td>Row 1</td><td>Value 1</td></tr>
</table>
</div></div>
panel = browser.find_by_xpath('//*[@id="main"]//div[@class="heading"][contains(normalize-space(), "Table A")]/following-sibling::table')
panel.find_by_tag("td") # return two elements from Table A
panel.find_by_xpath('//td') # will return all of td's
The reason why I'm using the xpath is that I want to find a cell with value next to some "label cell": //td[text()="Row 1"]/following-sibling::td[1] and in my code I have many of such row's with same names.
Expected behavior: it will return only td's from given panel.
Xpaths were tested also on http://xpather.com/ and it's working like expected.
Problem:
I want to find a
<td>
from table, from given panel by using xpath and chaining find_by_* methods.The reason why I'm using the xpath is that I want to find a cell with value next to some "label cell":
//td[text()="Row 1"]/following-sibling::td[1]
and in my code I have many of such row's with same names.Expected behavior: it will return only td's from given panel.
Xpaths were tested also on http://xpather.com/ and it's working like expected.
Splinter version: 0.21.0, selenium: selenium/standalone-firefox:4.27
Browser setup like this:
The text was updated successfully, but these errors were encountered: