You are here

public function FeatureContext::iClickTheFakeButton in Bear 7

@Given /^I click the fake "([^"]*)" button$/

File

tests/features/bootstrap/FeatureContext.php, line 166

Class

FeatureContext
Defines application features from the specific context.

Code

public function iClickTheFakeButton($text) {

  // Media style selector "buttons" are A tags with no href, so not findable
  // by normal steps.
  $driver = $this
    ->getSession()
    ->getDriver();
  $buttons = $driver
    ->find("//a[text()='{$text}']");
  $buttons[0]
    ->click();
}