Skip to content

Instantly share code, notes, and snippets.

View tomav's full-sized avatar

Thomas VIAL tomav

View GitHub Profile
@rande
rande / gist:977427
Created May 17, 2011 21:19
Behat steps
<?php
$steps->And('/^I press item "([^"]*)"$/', function($world, $xpath) {
$button = $world->getSession()->getDriver()->find($xpath);
$button = count($button) > 0 ? current($button) : null;
if (null === $button) {
throw new ElementNotFoundException('button', $xpath);
}