You are here

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

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

Accept Alerts After going to the next step.

@AftereStep @AcceptAlertsAfterStep

File

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

Class

VarbaseContext
Defines application features from the specific context.

Code

public function afterStepAcceptAlert(AfterStepScope $scope) {
  try {
    $this
      ->getSession()
      ->getDriver()
      ->getWebDriverSession()
      ->accept_alert();
  } catch (Exception $e) {

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