0

请帮我编写css选择器来识别保存按钮。WebElement save_btn = driver.findElement(By.cssSelector(""));

<div id="button-1050" class="x-btn actionButton x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" style="border-width: 1px; left: 293px; top: 5px; margin: 0px;">
<em id="button-1050-btnWrap">
<button id="button-1050-btnEl" autocomplete="off" role="button" hidefocus="true" type="button" style="height: 16px;" class="x-btn-center">
<span id="button-1050-btnInnerEl" class="x-btn-inner" style="">Save</span>
<span id="button-1050-btnIconEl" class="x-btn-icon "></span>
4

1 回答 1

0

我的官方回答是:

save_btn = driver.findElement(By.xpathSelector("//*[text()[contains(.,'Save')]]"));
于 2013-08-19T23:22:12.173 回答