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 clickElementWithGivenId($elementId)
{
$session = $this->getSession();
$page = $session->getPage();
$element = $page->find('css', '#' . $elementId);
if (null === $element) {
throw new \InvalidArgumentException(sprintf('Could not evaluate CSS: "%s"', $elementId));
}
$element->click();
}
}