Skip to content

Instantly share code, notes, and snippets.

@guiguiboy
Created October 2, 2014 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guiguiboy/0b390a61bc79e842706d to your computer and use it in GitHub Desktop.
Save guiguiboy/0b390a61bc79e842706d to your computer and use it in GitHub Desktop.
behat - rich text
<?php
class MyContext extends \Behat\Behat\Context\BehatContext{
......
/**
* Allows to fill in a tinyMCE rich text textarea by disabling the control
*
* @Given /^I fill in rich text editor "([^"]*)" with "([^"]*)"$/
*/
public function jeRemplisLeChampTexteRicheAvec($id, $content)
{
$this->getSession()->wait(1000, "tinyMCE.remove('.rich_editor')");
$this->getMainContext()->fillField($id, $content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment