MDL-58948 behat: catch ElementNotFoundException

Another valid exception that can be thrown from a Mink driver
is the ElementNotFoundException when an element has gone missing.
This commit is contained in:
Mark Nielsen 2017-06-28 11:36:36 -07:00
parent 3cf0d01a61
commit f5459099ae
2 changed files with 5 additions and 0 deletions

View file

@ -634,6 +634,9 @@ class behat_general extends behat_base {
} catch (WebDriver\Exception\NoSuchElement $e) {
// Do nothing just return, as element is no more on page.
return true;
} catch (ElementNotFoundException $e) {
// Do nothing just return, as element is no more on page.
return true;
}
}