Steps for web testing using selenium and planterbox
Project description
A suite of steps for planterbox for web testing with Selenium
Usage
Install planterbox and planterbox-webdriver: pip install planterbox planterbox-webdriver
Add a unittest.cfg to your project that enables planterbox:
[unittest] plugins = planterbox [planterbox] always-on = True
3. Create a package containing your tests; its __init__.py defines the steps you will have available in your .feature files. This package must be detected by nose2 as containing tests; see nose2’s docs for details.
Add a “before” hook that sets up a webdriver for your tests:
@hook('before', 'feature') def create_webdriver(test): from selenium import webdriver test.browser = webdriver.Firefox()
from planterbox_webdriver.webdriver import * if you want steps that let you find elements in your tests with XPath
from planterbox_webdriver.css_selector_steps import * for steps that let you find elements in your tests with jQuery-style CSS selectors
Add a .feature file in this package containing tests specified using Gherkin. planterbox will turn these into appropriate test case objects and give them to nose to run.
Run your tests: nose2
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
Built Distribution
File details
Details for the file planterbox-webdriver-0.4.0.tar.gz
.
File metadata
- Download URL: planterbox-webdriver-0.4.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d735d6e7c4e4ff60ba7ae031cd861bb7e980174b142bb2058a6a4901fae7c8 |
|
MD5 | 89b4deeb66ed99559c41bed3fb42f048 |
|
BLAKE2b-256 | f109a8b94a63edc27639c2b3386e430ebee2eea6afda532cd5ef850e9e81290a |
File details
Details for the file planterbox_webdriver-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: planterbox_webdriver-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 45.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d06b1b95373e2f1af8649abc15eccaaa606e88d06e66b2151c56c86a9342aa0 |
|
MD5 | a7c0062d6f45a10cb96f35d13ec358d4 |
|
BLAKE2b-256 | 189fd6499564ccc0891c85092a5a52959f5f19a2d92ddeaea0f34d1ca60efef0 |