Skip to content

Instantly share code, notes, and snippets.

@ogredude
Forked from anonymous/gist:6532362
Created September 12, 2013 02:10
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 ogredude/6532387 to your computer and use it in GitHub Desktop.
Save ogredude/6532387 to your computer and use it in GitHub Desktop.
/**
* Fills in form field with specified id|name|label|value.
*
* @When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
* @When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with:$/
* @When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/
*/
public function fillField($field, $value)
{
$field = $this->fixStepArgument($field);
$value = $this->fixStepArgument(addslashes($value));
$this->getSession()->getPage()->fillField($field, $value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment