selenium.webdriver.common.bidi.browser¶
Classes
|
BiDi implementation of the browser module. |
|
Represents a client window information. |
Represents a window state. |
- class selenium.webdriver.common.bidi.browser.ClientWindowState[source]¶
Represents a window state.
- FULLSCREEN = 'fullscreen'¶
- MAXIMIZED = 'maximized'¶
- MINIMIZED = 'minimized'¶
- NORMAL = 'normal'¶
- class selenium.webdriver.common.bidi.browser.ClientWindowInfo(client_window: str, state: str, width: int, height: int, x: int, y: int, active: bool)[source]¶
Represents a client window information.
- get_state() str [source]¶
Gets the state of the client window.
Returns:¶
str: The state of the client window (one of the ClientWindowState constants).
- get_client_window() str [source]¶
Gets the client window identifier.
Returns:¶
str: The client window identifier.
- get_width() int [source]¶
Gets the width of the client window.
Returns:¶
int: The width of the client window.
- get_height() int [source]¶
Gets the height of the client window.
Returns:¶
int: The height of the client window.
- get_x() int [source]¶
Gets the x coordinate of the client window.
Returns:¶
int: The x coordinate of the client window.
- get_y() int [source]¶
Gets the y coordinate of the client window.
Returns:¶
int: The y coordinate of the client window.
- is_active() bool [source]¶
Checks if the client window is active.
Returns:¶
bool: True if the client window is active, False otherwise.
- classmethod from_dict(data: Dict) ClientWindowInfo [source]¶
Creates a ClientWindowInfo instance from a dictionary.
Parameters:¶
data: A dictionary containing the client window information.
Returns:¶
ClientWindowInfo: A new instance of ClientWindowInfo.
- class selenium.webdriver.common.bidi.browser.Browser(conn)[source]¶
BiDi implementation of the browser module.
- create_user_context() str [source]¶
Creates a new user context.
Returns:¶
str: The ID of the created user context.
- get_user_contexts() List[str] [source]¶
Gets all user contexts.
Returns:¶
List[str]: A list of user context IDs.
- remove_user_context(user_context_id: str) None [source]¶
Removes a user context.
Parameters:¶
user_context_id: The ID of the user context to remove.
Raises:¶
Exception: If the user context ID is “default” or does not exist.
- get_client_windows() List[ClientWindowInfo] [source]¶
Gets all client windows.
Returns:¶
List[ClientWindowInfo]: A list of client window information.