Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
f216c901
Commit
f216c901
authored
Jul 08, 2020
by
Andrew Nicols
Browse files
MDL-69232 behat: Add debugging information to Selenium fails
parent
cc3e7418
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/tests/behat/behat_hooks.php
View file @
f216c901
...
...
@@ -309,12 +309,23 @@ class behat_hooks extends behat_base {
}
catch
(
CurlExec
$e
)
{
// Exception thrown by WebDriver, so only @javascript tests will be caugth; in
// behat_util::check_server_status() we already checked that the server is running.
throw
new
behat_stop_exception
(
$driverexceptionmsg
);
throw
new
behat_stop_exception
(
$driverexceptionmsg
.
'. '
.
$e
->
getMessage
()
.
"
\n\n
"
.
format_backtrace
(
$e
->
getTrace
(),
true
)
);
}
catch
(
DriverException
$e
)
{
throw
new
behat_stop_exception
(
$driverexceptionmsg
);
throw
new
behat_stop_exception
(
$driverexceptionmsg
.
'. '
.
$e
->
getMessage
()
.
"
\n\n
"
.
format_backtrace
(
$e
->
getTrace
(),
true
)
);
}
catch
(
UnknownError
$e
)
{
// Generic 'I have no idea' Selenium error. Custom exception to provide more feedback about possible solutions.
throw
new
behat_stop_exception
(
$e
->
getMessage
());
throw
new
behat_stop_exception
(
$e
->
getMessage
()
.
"
\n\n
"
.
format_backtrace
(
$e
->
getTrace
(),
true
)
);
}
$suitename
=
$scope
->
getSuite
()
->
getName
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment