mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
WebDriver: Implement Close Window closer to the spec
We are expected to return the list of open handles after closing the current handle. Also just return a WebDriver::Response instead of a wrapped Error variant.
This commit is contained in:
parent
9dc622475e
commit
47493b5734
4 changed files with 12 additions and 36 deletions
|
@ -559,8 +559,8 @@ Web::WebDriver::Response Client::handle_close_window(Vector<StringView> const& p
|
|||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Handling DELETE /session/<session_id>/window");
|
||||
auto* session = TRY(find_session_with_id(parameters[0]));
|
||||
TRY(unwrap_result(session->close_window()));
|
||||
return make_json_value(JsonValue());
|
||||
auto result = TRY(session->close_window());
|
||||
return make_json_value(result);
|
||||
}
|
||||
|
||||
// 11.4 Get Window Handles, https://w3c.github.io/webdriver/#dfn-get-window-handles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue