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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -