Skip to content

Commit

Permalink
Added setHtml() method to Selenium2Driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
J7mbo committed May 6, 2014
1 parent 39088af commit e887906
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Behat/Mink/Driver/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ public function getHtml($xpath)
return $this->executeJsOnXpath($xpath, 'return {{ELEMENT}}.innerHTML;');
}

/**
* {@inheritdoc}
*/
public function setHtml($xpath, $html)
{
$this->executeJsOnXpath($xpath, sprintf('{{ELEMENT}}.innerHTML = "%s";', addslashes($html)));
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit e887906

Please sign in to comment.