Index: lib/tests/behat/behat_general.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- lib/tests/behat/behat_general.php (date 1498675510000) +++ lib/tests/behat/behat_general.php (revision ) @@ -220,7 +220,12 @@ * @Given /^I accept the currently displayed dialog$/ */ public function accept_currently_displayed_alert_dialog() { - $this->getSession()->getDriver()->getWebDriverSession()->accept_alert(); + $driver = $this->getSession()->getDriver(); + if ($driver instanceof \DMore\ChromeDriver\ChromeDriver) { + $driver->acceptAlert(); + } else { + $driver->getWebDriverSession()->accept_alert(); + } } /** @@ -228,7 +233,12 @@ * @Given /^I dismiss the currently displayed dialog$/ */ public function dismiss_currently_displayed_alert_dialog() { - $this->getSession()->getDriver()->getWebDriverSession()->dismiss_alert(); + $driver = $this->getSession()->getDriver(); + if ($driver instanceof \DMore\ChromeDriver\ChromeDriver) { + $driver->dismissAlert(); + } else { + $this->getSession()->getDriver()->getWebDriverSession()->dismiss_alert(); + } } /**