You are here

public function VarbaseContext::beforeStepDismissAlert in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

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

Accept Alerts Before going to the next step.

@BeforeStep @AcceptAlertsBeforStep

File

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

Class

VarbaseContext
Defines application features from the specific context.

Code

public function beforeStepDismissAlert(BeforeStepScope $scope) {
  try {
    $this
      ->getSession()
      ->getDriver()
      ->getWebDriverSession()
      ->dismiss_alert();
  } catch (\WebDriver\Exception $e) {

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