WebContent: Ensure the Release Actions endpoint handles user prompts

This also contains an editorial refactor to the Perform Actions endpoint
to check for user prompts earlier.

See: 78d3c9b
This commit is contained in:
Timothy Flynn 2025-02-03 09:38:43 -05:00 committed by Sam Atkins
parent 0a46b5cbb1
commit 7edbd19675
Notes: github-actions[bot] 2025-02-05 11:34:43 +00:00
2 changed files with 41 additions and 34 deletions

View file

@ -791,7 +791,10 @@ Web::WebDriver::Response Client::release_actions(Web::WebDriver::Parameters para
{
dbgln_if(WEBDRIVER_DEBUG, "Handling DELETE /session/<session_id>/actions");
auto session = TRY(find_session_with_id(parameters[0]));
return session->web_content_connection().release_actions();
return session->perform_async_action([&](auto& connection) {
return connection.release_actions();
});
}
// 16.1 Dismiss Alert, https://w3c.github.io/webdriver/#dismiss-alert