Course → 1 · Selenium automation → Getting Started
1 · Selenium automation
Install Selenium and WebDriver
8 min · Module 6
Selenium drives real browsers so you can automate clicks, typing, and checks against a live site.
- Create and activate a virtual environment.
- Install the library:
pip install selenium. - Modern Selenium can manage ChromeDriver for you via Selenium Manager.
Keep your Django practice lab running at http://127.0.0.1:8000 while you experiment.
Example / notes
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
# options.add_argument("--headless=new") # optional
driver = webdriver.Chrome(options=options)
driver.get("http://127.0.0.1:8000/lab/")
print(driver.title)
driver.quit()
Practice in Lab: /lab/
Modules in this track
- 6. Getting Started
- 7. Finding Elements
- 8. Interactions
- 9. Waits
- 10. Assertions & Structure
- 11. Page Object Model
- 12. Alerts, Frames & Windows
- 13. Headless & Next Steps