Commit 2ea8a3e
committed
safari: Surface helpful safaridriver error message to end-user
The safaridriver provides useful diagnostic and remedy advice in its
error messages, so let's surface these by default by wrapping them in
QTapError. This also means we trade a not-useful internal stack trace
for more useful "Bail out from $testfile in $browser" attribution.
Before:
```
$ bin/qtap.js -b safari tests/fixtures/pass.html
__ERROR__
Error: Failed to create new session
at safariOne (/qtap/src/safari.js:112:13)
```
After:
```
$ bin/qtap.js -b safari tests/fixtures/pass.html
__ERROR__
Bail out from tests/fixtures/pass.html in Safari:
Error: Could not create a session: You must enable 'Allow remote automation'
in the Developer section of Safari Settings to control Safari via WebDriver.
HTTP 500 session not created
Failed to create a Safari session.
```1 parent f8cc69f commit 2ea8a3e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
0 commit comments