mirror of
https://github.com/moodle/moodle.git
synced 2025-04-27 03:14:20 +02:00
MDL-58948 behat: capture DriverException
Other drivers may throw a DriverException when the popup or iframe disappears.
This commit is contained in:
parent
f46a2dd913
commit
b095b36c02
@ -28,7 +28,8 @@
|
||||
|
||||
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
|
||||
|
||||
use Behat\Mink\Exception\ExpectationException as ExpectationException,
|
||||
use Behat\Mink\Exception\DriverException,
|
||||
Behat\Mink\Exception\ExpectationException as ExpectationException,
|
||||
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
|
||||
Behat\Mink\Element\NodeElement as NodeElement;
|
||||
|
||||
@ -881,6 +882,8 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
|
||||
|
||||
} catch (NoSuchWindow $e) {
|
||||
// If we were interacting with a popup window it will not exists after closing it.
|
||||
} catch (DriverException $e) {
|
||||
// Same reason as above.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user