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