Commit 50cdb600 authored by Eugene Venter's avatar Eugene Venter
Browse files

Behat: override Mink Selenium2Driver in order to add triggerSynScript method

Change-Id: Ic614ba1f1d26672cebd58acb00ba5ff6c711102c
parent 6a6e9af2
......@@ -254,4 +254,30 @@ class MaharaProgressFormatter extends ProgressFormatter {
use Behat\Mink\Driver\Selenium2Driver as Selenium2Driver;
* Selenium2 driver extension to allow extra selenium capabilities restricted by behat/mink-extension.
class MaharaSelenium2Driver extends Selenium2Driver
* Public interface to run Syn scripts.
* @see self::executeJsOnXpath()
* @param string $xpath the xpath to search with
* @param string $script the script to execute
* @param Boolean $sync whether to run the script synchronously (default is TRUE)
* @return mixed
public function triggerSynScript($xpath, $script, $sync = true) {
return $this->withSyn()->executeJsOnXpath($xpath, $script, $sync);
return new MaharaExtension();
......@@ -7,6 +7,7 @@
<parameter key="behat.mahara.parameters"></parameter>
<parameter key="mahara.gherkin.class">MaharaGherkin</parameter>
<parameter key="mahara.context.initializer.class">MaharaAwareInitializer</parameter>
<parameter key="behat.mink.driver.selenium2.class">MaharaSelenium2Driver</parameter>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment