webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Execute script tries to set a data property on errors

Open jgraham opened this issue 4 years ago • 6 comments
trafficstars

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.

jgraham avatar Sep 08 '21 14:09 jgraham

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.

shs96c avatar Jun 08 '22 09:06 shs96c

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.

whimboo avatar Jun 08 '22 12:06 whimboo

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?

whimboo avatar May 26 '23 12:05 whimboo