Skip to content

kadiratali/Selenium-Python-Example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Python Example

Python application

Articles written about this project

  1. Test Automation - How To Build a CI/CD Pipeline Using Pytest and GitHub Actions
  2. Test Automation - How To Attach Public IP Adress to Allure report using Pytest and Requests
  3. Test Automation - Selenium Example Python Project 2022 Updates
  4. Test Automation - How To Add Git Version Control Data To Allure Report in Python
  5. Test Automation - How To Attach Session Storage, Local Storage, Cookies, and Console logs To Allure Report in Selenium Python
  6. Test Automation - How To Capture Full-Page Screenshots In Selenium Python Using Chrome DevTools Protocol
  7. Test Automation - How To Edit Cookies in Selenium Python
  8. Test Automation - Pre-Merge Testing with GitHub Actions: A Step-by-Step Guide

Project Setup

  • Install scoop
  • Install allure commandline by running the following command:
scoop install allure
  • Clone the project
  • Navigate to the project directory
  • Install virtualenv:
py -m pip install --user virtualenv
  • Create a virtual environment:
py -m venv env
  • Activate the virtual environment:
.\env\Scripts\activate
  • Install project dependencies:
poetry install

Running Tests

pytest --browser <firefox/chrome_headless>

When no browser was selected then chrome will be used.

  • Run according to tags:
pytest -m <tag_name> --browser <firefox/chrome_headless>

Viewing Test Results

  • View allure results locally:
allure serve allure-results

View Help And Custom CLI Options

pytest --help

Sort imports

isort .

format code

black .

About

Selenium Python example project with pytest and Allure report

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%