Skip to content

nirtal85/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

Project Setup

  • Install scoop from www.scoop.sh
  • Install allure commandline by running the following command:
scoop install allure
  • git clone
  • cd to project directory
  • Install virtualenv:
py -m pip install --user virtualenv
  • Create a virtual environment:
py -m venv env
  • Activate your virtual environment:
.\env\Scripts\activate
  • Install pipenv:
pip install pipenv
  • Install project dependencies using pipenv:
pipenv install

Running Tests

pipenv run pytest --alluredir=allure-results --browser <firefox/chrome_headless>

When no browser was selected then chrome will be used.

  • Run according to tags:
pipenv run 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

About

Selenium Python example project with pytest and Allure report

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages