It will download a WebDriver, and then set basic configuration automatically.
Project description
PWDriver (PyWebDriver)
Motivation
To simplify automation settings of each different version, and browser.
Support:
-
ChromeDriver
-
GeckoDriver
-
EdgeDriver (Chromium)
-
IEDriver
Before:
-
You have to check your local browser's version
-
You have to download driver on each website
-
You have to set path to this driver like this:
from selenium import webdriver
webdriver.Chrome('YOUR_CHROMEDRIVER_PATH')
Usage
1. Install:
pip install pwdriver
2. Make 'config.ini' file and locate in your project directory.
config.ini 's contents be like this.
[automation]
;automation.browser: chrome, gecko, edge, ie, safari
automation.browser=chrome
;automation.local: true, false
automation.local=true
automation.url=http://localhost:4444/wd/hub
3. Import WebDriverFactory.
Now, we could launch webdriver.
'automation.browser' you set will be created.
from pwdriver.core import WebDriverFactory
driver = WebDriverFactory().launch()
Different Usage(using selenium)
Use with Chrome:
from selenium import webdriver
from pwdriver.core import WebDriverFactory
WebDriverFactory().setup_chromedriver()
driver = webdriver.Chrome()
Use with FireFox:
from selenium import webdriver
from pwdriver.core import WebDriverFactory
WebDriverFactory().setup_geckodriver()
driver = webdriver.firefox()
Use with Edge
from msedge.selenium_tools import Edge, EdgeOptions
from pwdriver.core import WebDriverFactory
WebDriverFactory().setup_edgedriver()
options = EdgeOptions()
options.use_chromium = True
driver = Edge(options=options)
Use with IE
from selenium import webdriver
from pwdriver.core import WebDriverFactory
WebDriverFactory().setup_iedriver()
driver = webdriver.Ie()
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
pwdriver-0.15.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file pwdriver-0.15.tar.gz
.
File metadata
- Download URL: pwdriver-0.15.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/58.3.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e49c125723255bcfe40bc4785b8e6a5dac47c2c3d9fbc0b72c7b5c0f6282fe6 |
|
MD5 | b567d744f2fb69e6ad77f82235c72a6e |
|
BLAKE2b-256 | d02156ffe3584be0082e4e9250f7b7776c80f949fc7da1a6155bb13ea4b99a73 |
File details
Details for the file pwdriver-0.15-py3-none-any.whl
.
File metadata
- Download URL: pwdriver-0.15-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32998ce2f66f2df6085976f1ffe5f805bd16d7b4ada6b49694b0fbdb14b03b98 |
|
MD5 | 4fa7d0a10c1310e9fad6829b7ed39e5b |
|
BLAKE2b-256 | 76bae36009e707da619ba4b2f3a0141a8d7e336da26987f67baa9f3f25b0188d |