public function VarbaseContext::iRightClick 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::iRightClick()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iRightClick()
Right click on an element.
Varbase Context #varbase.
Example #1: When I right click "#right-click-to-configure a" Example #2: And I right click "Right click action box"
@When /^I right click "([^"]*)"$/
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 907
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.");
}
}