Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python modules for selenium unit test

Project description

Python Modules for Selenium UnitTest

Installation

pip install selenium-unittest-common

Usage

from selenium_unittest_common.unittest import test_case

class SampleTestCase(test_case.BaseTestCase):
    @classmethod
    def setUpClass(cls):
        super(SampleTestCase, cls).setUpClass()
        cls.base_url = 'https://www.google.com'
        cls.page_url = cls.base_url

    @classmethod
    def tearDownClass(cls):
        cls.driver.close()
        cls.driver.quit()

    def setUp(self):
        super(SampleTestCase, self).setUp()
        self.driver.get(self.page_url)

Build & Pylint

  1. Make sure below modules are installed:
  • invoke
  • pylint
  1. Execute the following command
invoke clean build

Docker

Launching Container

docker-compose up -d --build

Executing Python Script

docker exec -it python python /root/script/sample.py

TODO

  • Add support for FireFox.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for selenium-unittest-common, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size selenium-unittest-common-1.0.3.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page