Selenium With Python
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
See the official Selenium site for details and documentation.
How to install Selenium¶
pip install selenium
How to import Selenium¶
Generally, we don't import Selenium as a whole, but rather the modules we need. Often, this will simply be the webdriver
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
to select elements By their HTML properties.
Check out seleniumplayground.practiceprobs.com - our sample site where you can scrape data, click buttons, and submit forms without fear of violating our terms of service.