Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97778

How to construct css_selector to work with Selenium and Python

$
0
0

Using CSS selector in selenium python, I'm trying to log in to webpage automatically.

Instead of using:

driver.find_element_by_id()

I wanna practice using:

driver.find_elements_by_css_selector()

So i coded it like :

userId = driver.find_elements_by_css_selector('input[id = "pass"]')
userId.send_keys('blabla78945@gmail.com')

But it wont find the element that its supposed to be typed in. Whats the problem of this case?


Viewing all articles
Browse latest Browse all 97778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>