WebDriver: Add boilerplate for endpoint 15.7 Perform Actions

Following the structure of the ReleaseActions endpoints, define
analogous classes and methods for PerformActions
This commit is contained in:
Noah Bright 2024-09-02 14:41:24 -04:00 committed by Sam Atkins
commit ee352e59db
Notes: github-actions[bot] 2024-09-09 13:12:24 +00:00
7 changed files with 33 additions and 0 deletions

View file

@ -677,6 +677,15 @@ Web::WebDriver::Response Client::delete_all_cookies(Web::WebDriver::Parameters p
return session->web_content_connection().delete_all_cookies();
}
// 15.7 Perform Actions, https://w3c.github.io/webdriver/#perform-actions
// POST /session/{session id}/actions
Web::WebDriver::Response Client::perform_actions(Web::WebDriver::Parameters parameters, JsonValue)
{
dbgln_if(WEBDRIVER_DEBUG, "Handling POST /session/<session_id>/actions");
auto session = TRY(find_session_with_id(parameters[0]));
return session->web_content_connection().perform_actions();
}
// 15.8 Release Actions, https://w3c.github.io/webdriver/#release-actions
// DELETE /session/{session id}/actions
Web::WebDriver::Response Client::release_actions(Web::WebDriver::Parameters parameters, JsonValue)