public function MediaSubContext::iClickTheFakeButton in Panopoly 7
@When I click the fake :text button
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test_media.behat.inc, line 32 - Provide Behat step-definitions for the Media module.
Class
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();
}