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
{{ message }}
Repository navigation
Chaining find_by_* seems to have no effect for xpath #1325
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.
Activity