Name | autoparaselenium JSON |
Version |
0.3.1
JSON |
| download |
home_page | |
Summary | A library to make parallel selenium tests that automatically download and setup webdrivers |
upload_time | 2023-07-28 04:54:50 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License Copyright (c) [year] [fullname] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \Software\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \AS IS\, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
selenium
automatic
parallel
testing
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```python
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
* [pytest-parallel python3.9 support fork](https://github.com/andni233/pytest-parallel/tree/python39-support)
Raw data
{
"_id": null,
"home_page": "",
"name": "autoparaselenium",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "selenium,automatic,parallel,testing",
"author": "",
"author_email": "Ronak Badhe <ronak.badhe@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fb/79/7c6d2b7686c190717b69b765c66892e056056fd0fb6e9be410d97957d5e5/autoparaselenium-0.3.1.tar.gz",
"platform": null,
"description": "# AutoParaSelenium\n\nA library to make parallel selenium tests that automatically download and setup webdrivers\n\n## Usage\n\n### Installation\n\n```\npip install autoparaselenium\n```\n\n### Code\n\nThe API is very simple\n\n```python\nfrom typing import Union\n\nfrom selenium import webdriver\n\nfrom autoparaselenium import configure, chrome, firefox, run_on, all_, Extension\n\n# All parameters are optional, but still call it once before everything\nconfigure(\n extensions=[\n Extension(chrome=\"path to chrome extension to install\"),\n Extension(firefox=\"path to firefox extension to install\"),\n Extension(chrome=\"chrome path\", firefox=\"firefox path\")\n ],\n headless=True, # if there are chrome extensions, chrome will not be headless as a selenium limitation\n selenium_dir=\"./drivers\"\n)\n\n@run_on(all_)\ndef test_both_firefox_and_chrome(web: Union[webdriver.Firefox, webdriver.Chrome]):\n ...\n\n@run_on(firefox)\ndef test_firefox_only(web: webdriver.Firefox):\n ...\n\n@run_on(chrome)\ndef test_chrome_only(web: webdriver.Chrome):\n ...\n```\n\n### Running \n\nUse `pytest --tests-per-worker PROC` where `PROC` is the number of parallel threads\n\n## Credits\n\n* [pytest-parallel python3.9 support fork](https://github.com/andni233/pytest-parallel/tree/python39-support)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) [year] [fullname] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\Software\\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \\AS IS\\, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A library to make parallel selenium tests that automatically download and setup webdrivers",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"selenium",
"automatic",
"parallel",
"testing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ce9780ccbb2f3710aeee6173f11addba7fe77f7a9305af9a0d45eab1117c34e6",
"md5": "4d359f180f09cddec9e88b2dae600f78",
"sha256": "2d48d9c9b0fbc3c2c5039c14737bae7daa7563eb4dfc2315a680ca2112b6cfab"
},
"downloads": -1,
"filename": "autoparaselenium-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4d359f180f09cddec9e88b2dae600f78",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9502,
"upload_time": "2023-07-28T04:54:48",
"upload_time_iso_8601": "2023-07-28T04:54:48.717983Z",
"url": "https://files.pythonhosted.org/packages/ce/97/80ccbb2f3710aeee6173f11addba7fe77f7a9305af9a0d45eab1117c34e6/autoparaselenium-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb797c6d2b7686c190717b69b765c66892e056056fd0fb6e9be410d97957d5e5",
"md5": "ff976606cee3649d7682735b80982460",
"sha256": "85cf4f5b63906c73e8dd6736f545832300819cdd9ddde43f7bd7282cc80a0f12"
},
"downloads": -1,
"filename": "autoparaselenium-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "ff976606cee3649d7682735b80982460",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9333,
"upload_time": "2023-07-28T04:54:50",
"upload_time_iso_8601": "2023-07-28T04:54:50.250573Z",
"url": "https://files.pythonhosted.org/packages/fb/79/7c6d2b7686c190717b69b765c66892e056056fd0fb6e9be410d97957d5e5/autoparaselenium-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-28 04:54:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "autoparaselenium"
}