CSS selector is not finding element in selenium grid -
i trying find submit element. html structure below.
<div> <span class="combutton"><a href="javascript:void(0);">submit</a></span> </div> <div> <span class="combutton"><a href="#cancel">cancel</a></span> </div>
in browser using firebug tried
$('div .combutton')[0].click()
which clicks on submit perfectly. using selenium driver element not found. please tell me how using
driver.findelement(by.css("cssselectorstring"))
what did in firebug shouldn't have effect since it's clicking on span
, not a
inside it.
this should work, unless omitted parts of markup otherwise prevent it:
driver.findelement(by.cssselector("div:first-child .combutton a")).click();
Comments
Post a Comment