[wdspec] ScriptEvaluateResultException doesn't have a string representation (missed __str__)
Categories
(Remote Protocol :: WebDriver BiDi, defect, P1)
Tracking
(firefox116 fixed)
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
Details
(Whiteboard: [webdriver:m7], [wptsync upstream])
Attachments
(1 file)
Right now we only see a generic Script execution failed error in case script.evaluate or script.callFunction are failing to execute a script. See bug 1833562 as example.
This happens because the ScriptEvaluateResultException class doesn't have a __str__ method to create human readable string and we only initialize the super class with the given error message:
Also I think that this error class should actually be based off the BidiException class:
| Assignee | ||
Comment 1•2 years ago
|
||
It would be good to know if we could add general Wdspec tests for this but then the returned error message should be the same.
I think that for specific Javascript errors as thrown by the test itself this will be fine. But if a browser related error happens we cannot align on a message format, but this is most likely ok and should not be covered by such a wdspec test.
James, would you foresee any issues with that? If not we should get this fixed / extended soon to have better failure messages in CI.
Comment 2•2 years ago
|
||
I don't think we can expect different browsers to return exactly the same error string in any situation.
Also note that this isn't a protocol-level error, but the representation of a JS exception. So it doesn't obviously make sense for it to map to BidiException; that is currently only for actual protocol errors.
| Assignee | ||
Comment 3•2 years ago
|
||
Thanks. And yes, that makes sense. In that case lets just add a __str__ method to the class.
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
| bugherder | ||
Comment 10•2 years ago
|
||
| bugherder | ||
Description
•