Skip to main content

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

Metadata

Release files for autoparaselenium 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autoparaselenium 0.3.1
File Size Uploaded
autoparaselenium-0.3.1.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autoparaselenium 0.3.1
File Interpreter ABI Platform
autoparaselenium-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / autoparaselenium-0.3.1.tar.gz

Download URL autoparaselenium-0.3.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
85cf4f5b63906c73e8dd6736f545832300819cdd9ddde43f7bd7282cc80a0f12
BLAKE2b-256 checksum
How to use checksums
fb797c6d2b7686c190717b69b765c66892e056056fd0fb6e9be410d97957d5e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / autoparaselenium-0.3.1-py3-none-any.whl

Download URL autoparaselenium-0.3.1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d48d9c9b0fbc3c2c5039c14737bae7daa7563eb4dfc2315a680ca2112b6cfab
BLAKE2b-256 checksum
How to use checksums
ce9780ccbb2f3710aeee6173f11addba7fe77f7a9305af9a0d45eab1117c34e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.16

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page