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).
Slides from presentation held on DrupalCafe Kyiv
Related blog posts:
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: #1886780: Make 7.x-3.x recommended
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 in the following way:
- Go to the PatchRanger site. PatchRanger - is the first Drupal patch crowd funding platform. PatchRanger - is the service created by the co-maintainer of the module in order to provide users with reliable and modern software and developers - with the source of financing, that allows not to be distracted from the module maintainership for earning.
- Select the desired issue - and assign a bounty for its solution. Bounty assignment is done by bank transfer, using 3-D Secure technology. It means that authorization to commit the transaction is carried out on the side of the issuing bank of your card - so it provides maximum security. Minimum transfer amount = $ 0.01.
- Once the issue is closed, the developer will be rewarded with all the collectively accumulated sum. By the way, to get the reward, not necessarily to be a co-maintainer of the module: simply upload a patch that solves the problem to the Drupal.org issue queue (as usual). The reward will be paid as soon as the issue stays fixed for two weeks after the patch has been committed.
Support this module to make new features to be implemented faster:
PatchRanger - the first Drupal patch crowd funding platform: