Categories
Python Selenium

Learn Automation Testing: Build Your Selenium Framework with Python and Pytest

1. Introduction to Automation Testing

  • What is automation testing?
  • Benefits of using Selenium for web automation.
  • Overview of the Python Selenium Framework with Pytest.
Categories
Selenium

Basics of Selenium WebDriver

Selenium WebDriver is the heart of web automation testing, providing a simple and effective API to interact with web elements and automate browser actions. In this chapter, we will dive into the basics of Selenium WebDriver, covering how it works, how to locate elements, and how to interact with web applications.

Categories
Automated Testing Python Selenium

How to run parallel test with pytest

Parallel test execution involves running multiple tests simultaneously, significantly reducing the total testing duration.

This method spreads tests across various resources, like multiple CPU cores, threads, or different machines, to execute them simultaneously.

Categories
Automated Testing Python Selenium

Folder Structure Python Selenium Framework with Pytest

Here’s a recommended project structure for end-to-end (E2E) testing with Python, Selenium, and pytest:

project_folder/
├── tests/
│   ├── e2e/
│   │   ├── test_suite_1/
│   │   │   ├── test_case_1.py
│   │   │   └── test_case_2.py
│   │   └── test_suite_2/
│   │       ├── test_case_3.py
│   │       └── test_case_4.py
├── pages/
│   ├── home_page.py
│   ├── login_page.py
│   └── registration_page.py
├── utils/
│   ├── test_data.py
│   ├── configuration.py
│   └── logger.py
├── reports/
│   ├── screenshots/
│   ├── videos/
│   └── test_results.html
├── drivers/
│   ├── chromedriver.exe
│   └── geckodriver.exe
├── conftest.py
├── pytest.ini
├── main.py
└── README.md
Categories
Python Selenium

Selenium & Python

Download and install python

Go to python.org official website and download the latest version.

download python 3.12
Categories
Automated Testing JavaScript Selenium

Selenium & JavaScript

Selenium documentation

Initialize the project

npm init -y
// https://www.npmjs.com/package/selenium-webdriver?activeTab=readme
npm i selenium-webdriver
Categories
Automated Testing Python Selenium

Introduction to Automation Testing

Automation testing has become a cornerstone of modern software development, enabling faster release cycles, improved accuracy, and reduced manual effort. In this chapter, we’ll dive into the fundamentals of automation testing, its benefits, and why Python Selenium Framework combined with Pytest is a powerful choice for web testing.