You are here

public function TestSubContext::iCancelPopup in Panopoly 7

@When (I )cancel the popup

File

modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc, line 1142
Provide Behat step-definitions for generic Panopoly tests.

Class

TestSubContext

Code

public function iCancelPopup() {
  for ($i = 0; $i < 5; $i++) {
    try {
      $this
        ->getSession()
        ->getDriver()
        ->getWebDriverSession()
        ->dismiss_alert();
      break;
    } catch (NoAlertOpenError $e) {
      sleep(1);
    }
  }
}