Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saadsalmanakram/selenium-speedrun
Everything you need to know about Selenium...
https://github.com/saadsalmanakram/selenium-speedrun
selenium selenium-grid selenium-java selenium-python selenium-webdriver
Last synced: 9 days ago
JSON representation
Everything you need to know about Selenium...
- Host: GitHub
- URL: https://github.com/saadsalmanakram/selenium-speedrun
- Owner: saadsalmanakram
- Created: 2025-01-02T14:36:50.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-01-28T04:20:25.000Z (9 days ago)
- Last Synced: 2025-01-28T05:23:05.001Z (9 days ago)
- Topics: selenium, selenium-grid, selenium-java, selenium-python, selenium-webdriver
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
# Selenium Speedrun π
![Selenium](https://upload.wikimedia.org/wikipedia/commons/d/d5/Selenium_Logo.png)
## π Introduction
**Selenium-Speedrun** is a hands-on guide to mastering **Selenium**, an open-source automation framework used for web testing. This repository provides a structured, fast-paced learning experience covering **browser automation, web scraping, and UI testing** with Python.
Whether you're a beginner or an experienced tester, this speedrun will equip you with essential Selenium concepts, best practices, and real-world examples.
## π Features
- **Quick Start:** Get up and running with Selenium in minutes.
- **Web Automation:** Learn how to interact with web pages dynamically.
- **Testing Frameworks:** Integrate Selenium with **pytest** and **unittest**.
- **Headless Browsing:** Run tests in the background without a UI.
- **Web Scraping:** Extract and process web data efficiently.
- **Explicit & Implicit Waits:** Master synchronization techniques.
- **Handling Forms & Popups:** Automate user inputs and alerts.
- **Cross-Browser Testing:** Work with Chrome, Firefox, Edge, and more.
- **Page Object Model (POM):** Implement scalable automation frameworks.---
## π Prerequisites
Before you start, ensure you have the following installed:
- Python 3.x [Download Here](https://www.python.org/downloads/)
- Google Chrome / Firefox / Edge
- ChromeDriver / GeckoDriver / EdgeDriver
- Selenium (`pip install selenium`)---
## π Project Structure
```
Selenium-Speedrun/
βββ examples/ # Practical Selenium scripts
βββ tests/ # UI automation test cases
βββ resources/ # Sample web pages for testing
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
βββ setup.py # Setup instructions
```---
## β‘ Quick Start
### 1οΈβ£ Clone the Repository
```bash
git clone https://github.com/saadsalmanakram/Selenium-Speedrun.git
cd Selenium-Speedrun
```### 2οΈβ£ Install Dependencies
```bash
pip install -r requirements.txt
```### 3οΈβ£ Run a Sample Script
```bash
python examples/first_script.py
```---
## π οΈ Example: Automating Google Search
Hereβs a simple script that opens Google, searches for "Selenium Python," and prints the first result:
```python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys# Initialize WebDriver
driver = webdriver.Chrome()# Open Google
driver.get("https://www.google.com")# Find search bar and input query
search_box = driver.find_element("name", "q")
search_box.send_keys("Selenium Python")
search_box.send_keys(Keys.RETURN)# Print first result
first_result = driver.find_element("xpath", "(//h3)[1]").text
print("First Result:", first_result)# Close browser
driver.quit()
```---
## β Topics Covered
1. **Setting Up Selenium** (ChromeDriver, GeckoDriver, EdgeDriver)
2. **Locators** (XPath, CSS Selectors, ID, Class, Name, Link Text)
3. **Interacting with Web Elements** (click, send_keys, get_text)
4. **Handling Alerts, Popups, and IFrames**
5. **Waits and Synchronization** (Implicit, Explicit, Fluent Waits)
6. **Taking Screenshots & Capturing Web Elements**
7. **Automating Forms, Dropdowns, and File Uploads**
8. **Executing JavaScript in Selenium**
9. **Headless Mode & Running Tests in Background**
10. **Cross-Browser Testing & Mobile Emulation**
11. **Building a Page Object Model (POM) Framework**---
## π Advanced Topics
- **CI/CD Integration:** Running Selenium tests in **GitHub Actions** & **Jenkins**
- **Parallel Testing:** Speed up automation using **pytest-xdist**
- **Dockerized Selenium Grid:** Run tests in distributed environments
- **Handling CAPTCHAs:** Using **OCR & AI-based solutions**---
## π Supported Browsers
| Browser | Driver | Install Command |
|---------|--------|----------------|
| Chrome | ChromeDriver | `brew install chromedriver` / Manual |
| Firefox | GeckoDriver | `brew install geckodriver` |
| Edge | EdgeDriver | Manual (MS Edge DevTools) |> **Note:** Make sure the driver version matches your browser version.
---
## π Contributions
π We welcome contributions! If you find a bug, have a feature request, or want to improve existing scripts, feel free to **fork** the repo and submit a **pull request**.
**How to Contribute?**
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-name`).
3. Commit changes (`git commit -m "Added new feature"`).
4. Push to your branch (`git push origin feature-name`).
5. Open a pull request.---
## π License
This project is licensed under the **MIT License** β feel free to use and modify the code.
---
## π Resources & References
- [Selenium Official Documentation](https://www.selenium.dev/documentation/)
- [Python Selenium Guide](https://selenium-python.readthedocs.io/)
- [Selenium WebDriver API](https://www.selenium.dev/documentation/webdriver/)---
## π¬ Contact
For queries or collaboration, reach out via:
π§ **Email:** [email protected]
π **GitHub:** [SaadSalmanAkram](https://github.com/saadsalmanakram)
πΌ **LinkedIn:** [Saad Salman Akram](https://www.linkedin.com/in/saadsalmanakram/)---
π₯ **Happy Testing & Web Automation!** π₯
---