This module integrates Drupal with the Selenium test tool.
Integration of Selenium with simpletest. All tests can run in 2 modes, depending on a browser:
- Firefox and Chrome can work both on original site and against simpletest sandbox
- Opera and Internet Explorer can only work on original site
Both modes are launched via standard Simpletest interface.
Selenium Webdriver is completely different product then Selenium 1 RC and tests should be written manually (not recorded with Selenium IDE). However we try to keep API similar to general drupal simpletests (DrupalWebTestCase class). Our aim is to create most of the methods from DrupalWebTestCase so tests can be written similar way we write unit tests.
We can get all properties of every dom element of the page. We can find elements using sizzle library selectors (this library is used by jQuery). Example: "div.header a.active" -- Find all links with class "active" in all div blocks with class .header.
Our aim is to implement all methods DrupalWebTestCase. So current tests can be run in Selenium instead of internal web browser.
Current functionality of Selenium module has already a lot of methods implemented including:
1. drupalLogin, drupalLogout
2. asserts: assertLink, assertTitle, assertText, assertNoText
3. verboseScreenshot -- grab screenshot
4. drupalGet, drupalPost
All other functionality can be reached using connection to Driver (class SeleniumFirefoxDriver, SeleniumChromeDriver) and using element control (class SeleniumWebElement).
Thanks to neochief we have opened 7.x-3.x branch that has integration with simpletest 2.x.
This branch is made recommended since it has all the functionality of 7.x-2.x and tended not to have any problems with core Simpletest. There is a special issue to put feedback about using it with core Simpletest:
How much does it cost?
It is absolutely free. But you have the opportunity to contribute to the implementation of new features or speed up the closure of the bug that annoys you, or just to thank the developers.
Support this module to make new features to be implemented faster:
- Flattr project page:
- FreedomSponsors project page
- Slides from presentation held on DrupalCafe Kyiv
- Related blog posts:
- GitHub project page
- (Serviceability) Travis current state
PatchRanger - the first crowdfunded Drupal freelancer: