diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php index f487c8f7da5c5..bbbe7ccc67ff5 100644 --- a/lib/tests/behat/behat_hooks.php +++ b/lib/tests/behat/behat_hooks.php @@ -250,7 +250,7 @@ public function i_look_for_exceptions() { // PHP debug messages. $phperrorxpath = "//div[@data-rel='phpdebugmessage']"; // Any other backtrace. - $othersxpath = "//ul[@data-rel='backtrace']"; + $othersxpath = "//*[contains(., ': call to ')])[1]"; $xpaths = array($exceptionsxpath, $debuggingxpath, $phperrorxpath, $othersxpath); $joinedxpath = implode(' | ', $xpaths);