Open Bug 1835677 Opened 1 year ago

[wpt-sync] Sync PR 40287 - Throw an error if webdriver action fails

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 40287 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/40287
Details from upstream follow.

Alexander Surkov <asurkov@igalia.com> wrote:

Throw an error if webdriver action fails

Promise reject should always go with an Error object because unhandled promise throws the given value.

If webdriver action fails, then it prints stack in terminal and all the wpt testsuite has is {status:error} object with no context. The given data has no |message| field either so the promise is rejected with 'error: undefined' string which makes a very misterious error. Throwing a real error with a good message gives a stack and a hint how to debug the failure.

Original Mozilla request: https://phabricator.services.mozilla.com/D178969

You need to log in before you can comment on or make changes to this bug.