You are here

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

Dismiss alert if present.

Varbase Context #varbase.

Example #1: When I dismiss alert Example #2: And dismiss alert.

@when /^(?:|I )dismiss alert$/

File

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

Class

VarbaseContext
Defines application features from the specific context.

Code

public function iDismissAlert() {
  try {
    $this
      ->getSession()
      ->getDriver()
      ->getWebDriverSession()
      ->dismiss_alert();
  } catch (Exception $e) {

    // no-op, alert might not be present.
  }
}