html - How to use CSS Selector in Selenium Web Driver -



html - How to use CSS Selector in Selenium Web Driver -

im trying element of table in project looks this:

then css path this:

#gridform > div > div:nth-child(2) > div > div > div.divtablerow > div > div.span11.leftalign

my code this:

webbrowser.current.findelement(by.cssselector("#gridform > div > div:nth-child(2) > div > div > div.divtablerow > div > div.span11.leftalign")

but cant seem locate element. way tried using xpath still no luck.

well depends.. class span11 unique? int case

webbrowser.current.findelement(by.cssselector("div.span11");

should work.

html css selenium xpath

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -