No project description provided
Project description
AutoParaSelenium
A library to make parallel selenium tests that automatically download and setup webdrivers
Usage
Installation
pip install autoparaselenium
Code
The API is very simple
from typing import Union
from selenium import webdriver
from autoparaselenium import configure, chrome, firefox, run_on, all_, Extension
# All parameters are optional, but still call it once before everything
configure(
extensions=[
Extension(chrome="path to chrome extension to install"),
Extension(firefox="path to firefox extension to install"),
Extension(chrome="chrome path", firefox="firefox path")
],
headless=True, # if there are chrome extensions, chrome will not be headless as a selenium limitation
selenium_dir="./drivers"
)
@run_on(all_)
def test_both_firefox_and_chrome(web: Union[webdriver.Firefox, webdriver.Chrome]):
...
@run_on(firefox)
def test_firefox_only(web: webdriver.Firefox):
...
@run_on(chrome)
def test_chrome_only(web: webdriver.Chrome):
...
Running
Use pytest --tests-per-worker PROC
where PROC
is the number of parallel threads
Credits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file autoparaselenium-0.1.15.tar.gz
.
File metadata
- Download URL: autoparaselenium-0.1.15.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b762e8ecbe4ee21c3d86ed95bf35db303c6afa5bee18735d186a2c454acf4d95 |
|
MD5 | 67be69a253efc95e7066154cc31dc63e |
|
BLAKE2b-256 | 7effde0c1f7c53aef7775d6816a80e447383c0703bacb57fbe0b6062a52b051b |
File details
Details for the file autoparaselenium-0.1.15-py3-none-any.whl
.
File metadata
- Download URL: autoparaselenium-0.1.15-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e597e468e19c616a7d58dbbdb5a363861fba975b5f468b344fffae85df541af |
|
MD5 | 2d3650a4fdecca16dcc3a57d10da7135 |
|
BLAKE2b-256 | 9ada865b2e16cb2f311ce37a4eb83ae71b40b84a6570e05e2a231078002ceeae |