public function VarbaseContext::iRightClick 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::iRightClick()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
#varbase: To right click on an element.
Example: When I move the mouse over "#right-click-to-configure a"
@When /^I right click "([^"]*)"$/
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 809
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iRightClick($selector) {
$elem = $this
->getSession()
->getPage()
->find('css', $selector);
if ($elem) {
$elem
->rightClick();
}
else {
throw new Exception("No element matching \"{$selector}\" is found.");
}
}