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
Post a Comment