SeasideSt / Parasol

Testing web apps in Smalltalk using Selenium WebDriver.
MIT License
31 stars 16 forks source link

Error message from Selenium 4 may not be in W3C format, crashing Parasol when it occurs #55

Closed jbrichau closed 2 years ago

jbrichau commented 2 years ago

Using Selenium 4, the error message that is returned may follow a different format than the W3C protocol. For example, the following can be returned when trying to delete a session that was already closed:

{
  "value": "\u002fsession\u002fc8f703018cf377e41f5a94584d3e4bab",
  "message": "Unable to execute request for an existing session: Unable to find session with ID: c8f703018cf377e41f5a94584d3e4bab\nBuild info: version: '4.1.2', revision: '9a5a329c5a'\n ......",
  "error": "org.openqa.selenium.NoSuchSessionException"
}

In W3C spec, the 'error' and 'message' attributes should have been nested inside the 'value' attribute. (see https://www.w3.org/TR/webdriver/#errors).

Since this crashes the error handling, a workaround in Parasol is needed. It is unclear to me why it occurs for now.

jbrichau commented 2 years ago

Fixed in #56