Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c048b93

Browse files
authored
Merge pull request baijum#92 from nehbehl/master
Added element selection by css
2 parents 6b40dff + 1d31667 commit c048b93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/navigating.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ you could find it using any of::
3333
element = driver.find_element_by_id("passwd-id")
3434
element = driver.find_element_by_name("passwd")
3535
element = driver.find_element_by_xpath("//input[@id='passwd-id']")
36+
element = driver.find_element_by_css_selector("input#passwd-id")
3637

3738
You can also look for a link by its text, but be careful! The text
3839
must be an exact match! You should also be careful when using `XPATH

0 commit comments

Comments
 (0)