I am using Behat for testing, with the ZombieJS driver, and everything is working very well so far, but there is one thing that bothers me, I can\'t seem to figure out how t
This is my adaptation of the answer by Comstar. The same functionality is achieved, however, it seems simpler to me to do it this way.
/**
* @Then /^I click on "([^"]*)"$/
*/
public function iClickOn($arg1)
{
$page = $this->getSession()->getPage();
$findName = $page->find("css", $arg1);
if (!$findName){
throw new Exception($arg1." could not be found");
}
else {
$findName->click();
}
}