Skip to content

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

Notifications You must be signed in to change notification settings

cdubwisdom/pytest_framework_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published