LibWeb+WebContent+WebDriver: Allow specifying multiple prompt handlers

WebDriver script authors may now provide either:
* A user prompt handler configuration to be used for all prompt types.
* A set of per-prompt-type user prompt handlers.

This also paves the way for interaction with the beforeunload prompt,
though we do not yet support that feature in LibWeb.

See: 43903d0
This commit is contained in:
Timothy Flynn 2025-02-05 11:36:19 -05:00 committed by Tim Flynn
commit 2583996e18
Notes: github-actions[bot] 2025-02-06 14:02:21 +00:00
10 changed files with 349 additions and 92 deletions

View file

@ -1,10 +1,11 @@
#include <LibWeb/WebDriver/Capabilities.h>
#include <LibWeb/WebDriver/Response.h>
#include <LibWeb/WebDriver/UserPrompt.h>
endpoint WebDriverClient {
close_session() => ()
set_page_load_strategy(Web::WebDriver::PageLoadStrategy page_load_strategy) =|
set_unhandled_prompt_behavior(Web::WebDriver::UnhandledPromptBehavior unhandled_prompt_behavior) =|
set_user_prompt_handler(Web::WebDriver::UserPromptHandler user_prompt_handler) =|
set_strict_file_interactability(bool strict_file_interactability) =|
set_is_webdriver_active(bool active) =|
get_timeouts() => (Web::WebDriver::Response response)