selenium.webdriver.common.bidi.sessionΒΆ

Classes

Session(conn)

UserPromptHandler([alert, before_unload, ...])

Represents the configuration of the user prompt handler.

UserPromptHandlerType()

Represents the behavior of the user prompt handler.

class selenium.webdriver.common.bidi.session.UserPromptHandlerType[source]ΒΆ

Represents the behavior of the user prompt handler.

ACCEPT = 'accept'ΒΆ
DISMISS = 'dismiss'ΒΆ
IGNORE = 'ignore'ΒΆ
VALID_TYPES = {'accept', 'dismiss', 'ignore'}ΒΆ
class selenium.webdriver.common.bidi.session.UserPromptHandler(alert: str | None = None, before_unload: str | None = None, confirm: str | None = None, default: str | None = None, file: str | None = None, prompt: str | None = None)[source]ΒΆ

Represents the configuration of the user prompt handler.

Initialize UserPromptHandler.

Parameters:ΒΆ

alert: Handler type for alert prompts before_unload: Handler type for beforeUnload prompts confirm: Handler type for confirm prompts default: Default handler type for all prompts file: Handler type for file picker prompts prompt: Handler type for prompt dialogs

Raises:ΒΆ

ValueError: If any handler type is not valid

to_dict() β†’ dict[str, str][source]ΒΆ

Convert the UserPromptHandler to a dictionary for BiDi protocol.

Returns:ΒΆ

Dict[str, str]: Dictionary representation suitable for BiDi protocol

class selenium.webdriver.common.bidi.session.Session(conn)[source]ΒΆ
subscribe(*events, browsing_contexts=None)[source]ΒΆ
unsubscribe(*events, browsing_contexts=None)[source]ΒΆ
status()[source]ΒΆ

The session.status command returns information about the remote end’s readiness to create new sessions and may include implementation-specific metadata.

ReturnsΒΆ

dict

Dictionary containing the ready state (bool), message (str) and metadata