Skip to content

Examples of automated web UI tests built using Selenium, Python and Pylenium.io

Notifications You must be signed in to change notification settings

MaksimZinovev/py-abn-lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABN Lookup: Automated Web UI Tests

This repository contains examples of automated web UI tests built using Selenium, Python and Pyleniumio

Tests :

  • TC-1

    • Steps:

    • Expected:

      • The search results shall contain
      • search_results
  • TC-2

    • Steps:

      • Execute TC-1

      • Click on link “27 152 260 814”

    • Expected:

      • ABN details should contain
      • abn_details

Installation

Installation includes the following steps:

  1. Clone repo.

  2. Create virtual environment.

  3. Activate virtual environment.

  4. Install dependencies from requirements.txt

Dependencies include:

  • python3
  • pip
  • virtualenv (or alternative tool)

Please find below more details on how to install repo.

Clone repo

  • Clone this repo to your local machine using
git clone https://github.com/MaksimZinovev/py-abn-lookup.git

Create virtual environment

Assuming you already have python3 installed on your machine.

cd py-abn-lookup

MacOS (virtualenv):

virtualenv venv

MacOS (venv):

python3 -m venv "venv"

Windows (venv):

python -m venv "venv"

Activate virtual environment

MacOS

source venv/bin/activate

Wndows - please refer to python docs

 venv\Scripts\activate.bat

Install dependencies from requirements.txt

pip install -r requirements.txt
pylenium --version

Install driver

Pylenium installs these for you automatically! YOU DO NOT NEED TO DO THIS!

For more details, please visit Pyleniumio docs.

Running the tests

Run all tests

pytest tests   

Run single test

pytest tests/test_abn_lookup.py::test_abn_details   

Headless tests

# Headless tests
pytest tests --options="headless, disable-gpu, no-sandbox"

Run the tests using Chrome.

You can configure which browser to use for tests in two ways: using pylenium.json or directly from terminal.

Pylenium.json is located in the root folder of the repo.

"driver": {
    "browser": "chrome",
    "remote_url": "",
    "wait_time": 10,
    "page_load_wait_time": 0,
    "options": [],
    "experimental_options": null,
    "capabilities": {},
    "extension_paths": [],
    "version": "latest"
  }

Configuring browser from terminal. This is the browser name - "chrome" or "firefox" or "ie" or "opera" or "edge". For example, running tests using Chrome

pytest tests --browser=chrome

test_results

For more configuration info, please read Pyleniumio docs.

FAQ

  • I am getting the error related to driver

    • Please check your browser version. Browser version should match driver version.
    • Update your browser if necessary or specify which driver version you want to use in pylenium.json.
    • For more info please visit Pyleniumio docs.

    chrome_version

    driver_manager  

  • I am on Windows and getting error while runningthe tests.

    • if you have python 3.9 try to use python 3.8 instead.

License

License

Test

Test2: this should be pulled from original repo https://github.com/MaksimZinovev/py-abn-lookup Test3: this should be pulled from original repo https://github.com/MaksimZinovev/py-abn-lookup

About

Examples of automated web UI tests built using Selenium, Python and Pylenium.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages