Skip to content

Instantly share code, notes, and snippets.

@morontt
Last active September 25, 2015 08:50
Show Gist options
  • Save morontt/716a755c1d20304c7769 to your computer and use it in GitHub Desktop.
Save morontt/716a755c1d20304c7769 to your computer and use it in GitHub Desktop.
wait
<?php
namespace Mega\TestBundle\Features\Context;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Behat\MinkExtension\Context\MinkContext;
/**
* Feature context.
*/
class FeatureContext extends MinkContext implements KernelAwareInterface
{
/**
* @When /^I select gender male$/
*/
public function iSelectGenderMale()
{
$page = $this->getSession()->getPage();
$link = $page->find('css', 'a.select_gender');
$link->click();
$this->wait(1);
$option = $this->getSession()
->getPage()
->find('xpath', '//ul[2]/li/a/span');
$option->click();
}
/**
* @Given /^wait (\d+) seconds$/
*/
public function wait($pause)
{
$this->getSession()->wait($pause * 1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment