You are here

public function VarbaseContext::iMouseOver 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::iMouseOver()
  2. 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iMouseOver()
  3. 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iMouseOver()
  4. 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iMouseOver()
  5. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iMouseOver()

Move the mouse over an element.

Varbase Context #varbase.

Example #1: When I move the mouse over "header#navbar #main_menu ul.nav li a" Example #2: And I move the mouse over "hero_slider"

@When /^I move the mouse over the "([^"]*)"$/

File

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

Class

VarbaseContext
Defines application features from the specific context.

Code

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