WebDriver: Allow deleting sessions with an invalid window handle

This case was missed in commit b5aa8f65b1.
This commit is contained in:
Timothy Flynn 2024-10-01 13:08:11 -04:00 committed by Tim Ledbetter
commit 969361abdb
Notes: github-actions[bot] 2024-10-06 00:44:11 +00:00

View file

@ -188,7 +188,7 @@ Web::WebDriver::Response Client::delete_session(Web::WebDriver::Parameters param
dbgln_if(WEBDRIVER_DEBUG, "Handling DELETE /session/<session_id>");
// 1. If the current session is an active session, try to close the session.
if (auto session = find_session_with_id(parameters[0]); !session.is_error())
if (auto session = find_session_with_id(parameters[0], AllowInvalidWindowHandle::Yes); !session.is_error())
close_session(session.value()->session_id());
// 2. Return success with data null.