public function FeatureContext::iShouldSeeTheVideo in Bear 7
@When /^I should see the "([^"]*)" video$/
File
- tests/
features/ bootstrap/ FeatureContext.php, line 188
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function iShouldSeeTheVideo($file) {
$video = $this
->getSession()
->getPage()
->find('xpath', '//iframe[title="{$file}]"');
if (!$video) {
throw new \Exception(sprintf('Image "%s" was not found on the page %s', $file, $this
->getSession()
->getCurrentUrl()));
}
}