You are here

public function VarbaseContext::iDoubleClick in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x

Same name and namespace in other branches
  1. 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClick()
  2. 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClick()
  3. 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClick()
  4. 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClick()
  5. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iDoubleClick()

Double click on an element.

Varbase Context #varbase.

Example #1 : When I double click "Earth Flag Image" Example #1 : And I double click "input#username"

@When /^I double click "([^"]*)"$/

File

tests/features/bootstrap/VarbaseContext.php, line 887

Class

VarbaseContext
Defines application features from the specific context.

Code

public function iDoubleClick($selector) {
  $elem = $this
    ->getSession()
    ->getPage()
    ->find('css', $selector);
  if ($elem) {
    $elem
      ->doubleClick();
  }
  else {
    throw new \Exception("No element matching \"{$selector}\" is found.");
  }
}