Python modules for selenium unit test
Project description
# Python Modules for Selenium UnitTest
### Installation
```bash
pip install selenium-unittest
```
### Usage
```python
from selenium-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
2. Execute the following command
```
invoke clean build
```bash
### Docker
#### Launching Container
```bash
docker-compose up -d --build
```
#### Executing Python Script
```bash
docker exec -it python python /root/script/sample.py
```
### TODO
* Add support for FireFox.
### Installation
```bash
pip install selenium-unittest
```
### Usage
```python
from selenium-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
2. Execute the following command
```
invoke clean build
```bash
### Docker
#### Launching Container
```bash
docker-compose up -d --build
```
#### Executing Python Script
```bash
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
Close
Hashes for selenium-unittest-common-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d9757a994ecdc3ddc2db7a1df53229bb72041207a464d58701dfe63e86eebba |
|
MD5 | 8526c533dd328c9501eed967e0887b56 |
|
BLAKE2b-256 | c5be5a796bef35ae74eab803e43f1e7883f8bbd30ee38f0376c0a5b9ef4a063a |