public function VarbaseContext::iDoubleClickOnTheImageWithTheAltText in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x
Same name and namespace in other branches
- 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
Double click on an image with the provided alt Text.
Varbase Context #varbase.
Example 1: I double click on the image with the "Flag Earth image title" alt text.
@Given /^I double click on the image with the "([^"]*)" alt text$/
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 758
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iDoubleClickOnTheImageWithTheAltText($altText) {
// Find an image with the title.
$element = $this
->getSession()
->getPage()
->find('xpath', "//img[contains(@alt, '{$altText}')]");
if (empty($element)) {
throw new \Exception('The page dose not have an image with the [ ' . $altText . ' ] alt text.');
}
// Double click on the image.
$element
->doubleClick();
}