selenium-how to click on link which is nested inside div -
i have div , hyperlink this:
<div id="food-add-actions" class="actions food_dialog fd_food_dialog_s-fndds2-f41210000"> <div class="right"> <a href="javascript://" class="food-add-button add button"><span></span><span>add food log</span></a> <a href="javascript://" class="edit button"><span></span><span>edit</span></a> </div> </div>
how can click on edit
hyperlink?
i tried below did not worked me
driver.findelement(by.classname("edit button")).click();
the problem have have space in by.classname.
there question similar problem here.
webdriver classname space using java
you should able select by.css selector, such as.
by.css('.right a.button')
Comments
Post a Comment