Skip to main content

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


Download files

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

Source Distribution

autoparaselenium-0.1.8.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

autoparaselenium-0.1.8-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file autoparaselenium-0.1.8.tar.gz.

File metadata

  • Download URL: autoparaselenium-0.1.8.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.14

File hashes

Hashes for autoparaselenium-0.1.8.tar.gz
Algorithm Hash digest
SHA256 43ef905459c700e26028f8487ed597baa7b050a04a54bb4d9ee5354fa9a99062
MD5 cdc6fdcf14956a385e1f69a4ba0c1e57
BLAKE2b-256 77c179868e7b8021d6a75321ed4d955e9db35c31bb5c9f24f26c0c99284764c3

See more details on using hashes here.

File details

Details for the file autoparaselenium-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: autoparaselenium-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.14

File hashes

Hashes for autoparaselenium-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b1c4025f355379684b1795b030c98c2dd75b433531a5b1459bc108320a6aa669
MD5 4d55e7f05a30788acf94ac6ac8af3177
BLAKE2b-256 9337969b7b4462eed2cd9ff025cffc9d194ad7f3ef6f3bd35bca4f5fa332e620

See more details on using hashes here.

Supported by

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