我正在使用 Selenium IDE 为我的网站编写测试,但在使用 preceding-sibling 单击按钮时遇到了问题。
<td>
<div class="btn-group">
<button class="btn btn btn-danger block" title="Warning, Delete" name="delete" type="button">
<button class="btn btn btn-default block" title="View History" name="history" type="button">
<button class="btn btn btn-default block" title="View Settings" name="settings" type="button">
<button class="btn btn btn-default block" name="device" type="button">
<span class="glyphicon glyphicon-pencil"/>
Arcade Reader
</button>
</div>
</td>
我的路径
xpath=//button[contains(.,'Arcade Reader')]/../preceding-sibling::button[@name='settings']