mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
WebDriver: Coerce window handles to strings when activating a tab
This allows the session to reject the request with "no such window", instead of crashing by assuming the JSON value was already a string.
This commit is contained in:
parent
9608bfb576
commit
6d331389ad
Notes:
sideshowbarker
2024-07-17 02:57:43 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/6d331389ad Pull-request: https://github.com/SerenityOS/serenity/pull/20649
1 changed files with 1 additions and 1 deletions
|
@ -323,7 +323,7 @@ Web::WebDriver::Response Client::switch_to_window(Web::WebDriver::Parameters par
|
|||
if (!handle.has_value())
|
||||
return Web::WebDriver::Error::from_code(Web::WebDriver::ErrorCode::InvalidArgument, "No property called 'handle' present");
|
||||
|
||||
return session->switch_to_window(handle->as_string());
|
||||
return session->switch_to_window(handle->to_deprecated_string());
|
||||
}
|
||||
|
||||
// 11.4 Get Window Handles, https://w3c.github.io/webdriver/#dfn-get-window-handles
|
||||
|
|
Loading…
Reference in a new issue