webdriver
webdriver copied to clipboard
Execute script tries to set a data property on errors
e.g. https://w3c.github.io/webdriver/#execute-script step 8 says:
Upon rejection of promise with reason r, let result be a JSON clone of r, and return error with error code javascript error and data result.
But there's no data property on error objects, so this doesn't make sense. The way the spec currently works it's an implementation detail whether the UA fills in useful information about the error or not.
There should be a data property on the error object: we specced it out that way to support people who want to provide additional context when things go wrong. I'm not sure when this removed, but we should make sure it's present. There are implementations (such as Selenium Grid) that use this field.
Note that issue #1661 prevents it to be shown on the GitHub page, but it's visible and still updated on https://www.w3.org/TR/webdriver/#errors.
Maybe it's time to poke here again. The data field is optional:
https://w3c.github.io/webdriver/#errors
@jgraham should we slightly rephrase the content to say that the remote end could add some additional data? Otherwise we might close this issue?