Skip to main content

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.

Source Distribution

selenium-unittest-common-1.0.3.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file selenium-unittest-common-1.0.3.tar.gz.

File metadata

  • Download URL: selenium-unittest-common-1.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for selenium-unittest-common-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7a08604340598846bae910c6b16e38f3110ece86652f04c3d7ea3ee380465ede
MD5 2f52feaac0d5355c12056595fe4f975c
BLAKE2b-256 5f02fad1cf95b7416b3f6070afe0b459f654172b86f5a0432feabd225a5d917b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page