public function VarbaseContext::iDoubleClickOnTheImageWithTheAltText in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.6
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.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClickOnTheImageWithTheAltText()
#varbase: To double click on an image with the provided alt Text.
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 674
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();
}