Giter Club home page Giter Club logo

python-selenium-docker-tests's Introduction

Python + Selenium + Docker

This sample project demonstrates how we can utilize docker container for running python selenium ui tests.

Script does the Docker Container start before the test gets executed and once execution is completed it will get stopped/removed.

Test script file ui-test.py has setUpClass() which instantiate the selenium container and tearDownClass() stop/remove the selenium container.

Requirements

Mac OS

Docker is installed and running.

Lunux/Windows OS

  • Docker is installed and running.
  • docker-compose is installed and running.

pip

pip install subprocess.run
pip install selenium 

Test Run

python ui-test.py

Output

Creating network "ui_test_default" with the default driver
Creating ui_test_chrome_standalone_1 ... done
test_case_1 (__main__.TestTemplate)
Find and click top-right button ... ok
test_case_2 (__main__.TestTemplate)
Find and click Learn more button ... ok
Removing ui_test_chrome_standalone_1...
removed...

----------------------------------------------------------------------
Ran 2 tests in 15.363s

OK

python-selenium-docker-tests's People

Contributors

jagdeep-jain avatar jagdeepjain avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.