cdubwisdom / pytest_framework_template

Page Object Framework template to help get started in Web UI testing using Selenium Webdriver

Repository from Github https://github.comcdubwisdom/pytest_framework_templateRepository from Github https://github.comcdubwisdom/pytest_framework_template

pytest_framework_template

A simple framework to jump start web ui testing using Selenium Webdriver and the Pytest Page Object testing framework

Includes functions to help find and use web elements, simplifying test methods.

When developing test scripts it is recommended to run test cases in an IDE that has pytest integration such as PyCharm.

To Run Locally

Requires Anaconda/Minconda to be installed and added to PATH.

Simply navigate to the project build folder and run build_run.sh,

cd [YOUR_PATH]/project_path/build
build_run.sh

Environment Setup

Miniconda3 was used to manage this suite's environment. Be free to use your preferred method.

The pytest_env.yml is optimized for conda. To initialize first install Anaconda. Then from your IDE terminal run,

conda env create --name ENV_NAME --file [FILE_PATH]/pytest_env.yml
cond activate ENV_NAME

Now you are ready to create and run tests.

If you install additional packages be sure to update the .yml otherwise the build script will fail.

Simply Run in the IDE terminal,

conda env export > pytest_env.yml

Debugging Tests

To assist in debugging tests it is recommended to disable headless mode, so you can watch the code control the browser. In conftest.py comment out opts.headless = True

Further Reading

Check out the wiki (WIP) for a deeper dive into the various modules.

Please Review the Writer class before developing new test methods.

About

Page Object Framework template to help get started in Web UI testing using Selenium Webdriver


Languages

Language:Python 93.8%Language:Shell 5.1%Language:HTML 1.2%