0% found this document useful (0 votes)
10 views3 pages

Selenium Python 2day CrashCourse

This document outlines a 2-day crash course on Selenium automation with Python, covering setup, basic navigation, element locators, waits, and advanced concepts like form automation and frameworks. It includes practical exercises and resources for further learning. Participants will learn to automate tasks such as logging in, searching for products, and using headless mode.

Uploaded by

Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Selenium Python 2day CrashCourse

This document outlines a 2-day crash course on Selenium automation with Python, covering setup, basic navigation, element locators, waits, and advanced concepts like form automation and frameworks. It includes practical exercises and resources for further learning. Participants will learn to automate tasks such as logging in, searching for products, and using headless mode.

Uploaded by

Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

2-Day Selenium Automation with Python - Crash Course

Day 1: Selenium Basics + Practice

1. Setup & Installation

-----------------------

- Install Python: https://www.python.org/

- Install Selenium:

pip install selenium

- Download ChromeDriver (match your browser version):

https://chromedriver.chromium.org/downloads

2. Launch and Navigate

----------------------

Sample Code:

from selenium import webdriver

driver = webdriver.Chrome()

driver.get("https://www.google.com")

print(driver.title)

driver.quit()

3. Element Locators (ID, Name, XPath, CSS)

------------------------------------------

driver.find_element("name", "q").send_keys("Selenium Python")

Practice Sites:

- https://demoqa.com/

- https://the-internet.herokuapp.com/

4. Waits, Alerts, Frames

------------------------

from selenium.webdriver.common.by import By


2-Day Selenium Automation with Python - Crash Course

from selenium.webdriver.support.ui import WebDriverWait

from selenium.webdriver.support import expected_conditions as EC

WebDriverWait(driver, 10).until(

EC.presence_of_element_located((By.ID, "username"))

Day 2: Advanced Concepts + Framework

1. Form Automation & Dropdowns

------------------------------

- Automate login forms, dropdowns, file uploads.

2. Screenshots & Headless Mode

------------------------------

driver.save_screenshot("screenshot.png")

from selenium.webdriver.chrome.options import Options

options = Options()

options.headless = True

driver = webdriver.Chrome(options=options)

3. Frameworks: Pytest + POM

---------------------------

- Learn basic pytest structure: tests/, pages/, conftest.py

- Use Page Object Model to reuse code

4. Final Practice Task

----------------------

- Login to demo site


2-Day Selenium Automation with Python - Crash Course

- Search product

- Add to cart

- Logout

Resources:

- Selenium Docs: https://selenium-python.readthedocs.io/

- Pytest Docs: https://docs.pytest.org/en/latest/

You might also like