13/02/2015 - BEHAT
If the element has an ID tag then you can use code below to click it.
use Behat\MinkExtension\Context\MinkContext;
class FeatureContext extends MinkContext
{
/**
* @When /^I click an element with ID "([^"]*)"$/
*
* @param $id
* @throws \Exception
*/
public function iClickAnElementWithId($id)
{
$element = $this->getSession()->getPage()->findById($id);
if (null === $element) {
throw new \Exception(sprintf('Could not evaluate element with ID: "%s"', $id));
}
$element->click();
}
}