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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -