Last active
September 25, 2015 08:50
-
-
Save morontt/716a755c1d20304c7769 to your computer and use it in GitHub Desktop.
wait
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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