css - How to write cssSelector to Find Save Button -
please me write css selector identify save button. 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>
my official answer is:
save_btn = driver.findelement(by.xpathselector("//*[text()[contains(.,'save')]]"));
Comments
Post a Comment