WebDriver Plus.
Project description
The most simple and powerful way to use Selenium with Python
WebDriver Plus is an extension to the Python bindings for Selenium WebDriver, which gives you a more concise and expressive API.
It helps you to quickly write readable, robust tests.
What’s so great about WebDriver Plus?
Browser instances that support pooling and automatic quit on exit.
A concise API for finding elements, and a wide range of selectors.
JQuery-style traversal and filtering for locating elements without using complex xpath expressions.
Perform actions on elements without having to use ActionChains.
Element highlighting makes working from the Python console a joy.
Note: If you’re interested in helping maintain WebDriver Plus in the long term please get in touch. Most of the author’s open source time is currently devoted to working on [Django REST framework][django-rest-framework].
Getting started
Install webdriverplus using pip.
pip install webdriverplus
Now fire up your Python console…
>>> from webdriverplus import WebDriver >>> browser = WebDriver().get('http://www.google.com')
Ok, let’s do a search.
>>> browser.find(name='q').send_keys('selenium\n')
Now let’s get the headings for all the search results.
>>> browser.find(id='search').find('h3') WebElementSet( <h3 class="r"><a href="http://seleniumhq.org/" class="l" onmousedown="retur... <h3 class="r"><a href="http://www.google.co.uk/url?sa=t&rct=j&q=sel... <h3 class="r"><a href="http://en.wikipedia.org/wiki/Selenium" class="l" onm... <h3 class="r"><a href="http://en.wikipedia.org/wiki/Selenium_%28software%29... <h3 class="r"><a href="http://ods.od.nih.gov/factsheets/selenium" class="l"... <h3 class="r"><a href="http://www.nlm.nih.gov/medlineplus/druginfo/natural/... <h3 class="r"><a href="http://www.hollandandbarrett.com/selenium-050" class... <h3 class="r"><a href="http://www.whfoods.com/genpage.php?dbid=95&tname... <h3 class="r"><a href="http://www.patient.co.uk/doctor/Selenium.htm" class=... <h3 class="r"><a href="/search?q=selenium&hl=en&biw=940&bih=938... <h3 class="r"><a href="http://www.umm.edu/altmed/articles/selenium-000325.h... )
Notice that WebDriver Plus has highlighted the selected elements for you, which is super helpful for when you’re writing tests and trying to make sure you’re selecting the correct elements:
![image](https://raw.github.com/tomchristie/webdriverplus/master/docs/screenshot.png)
Next steps
When you’re ready to get going, head over to the [full documentation](http://webdriver-plus.readthedocs.org/).
If you want to help contribute to the project, please read the [contribution notes](http://webdriver-plus.readthedocs.org/en/latest/topics/contributing.html).
[django-rest-framework]: http://django-rest-framework.org/
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
File details
Details for the file webdriverplus-0.1.4.tar.gz
.
File metadata
- Download URL: webdriverplus-0.1.4.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb214f8c5c8e37c50740ca21ac96f8fc098750619a5987b330466d71b19c2297 |
|
MD5 | 0c6581498ea72f1f455cbcfd773bd0c4 |
|
BLAKE2b-256 | 5836fd26890e336e41b9d65873541a424a444863d0bcb6bd8059b4a8c323dd5e |