java - Selenium xpath not found -
i tried xpath("//*[@id='btn-conv-view']")
click button in selenium web driver java code , didn't seem work. html below:
<button id="btn-conv-view" class="btn btn-absolute btn-view-dd" role="button" tabindex="-1" aria-haspopup="true" title="more view options" data-action="menu"> <span class="icon-text" id="yui_3_16_0_1_1443572970628_2273">sort date</span> <b class="icon icon-chevron-down" id="yui_3_16_0_1_1443572970628_2377"></b> </button>
you can use of ways find element needed:
driver.findelement(by.id("btn-conv-view")).click(); driver.findelement(by.xpath("id('btn-conv-view')")).click(); driver.findelement(by.cssselector("#btn-conv-view")).click();
Comments
Post a Comment