selenium.webdriver.common.bidi.permissionsΒΆ
Classes
|
Represents a permission descriptor. |
Represents the possible permission states. |
|
|
BiDi implementation of the permissions module. |
- class selenium.webdriver.common.bidi.permissions.PermissionState[source]ΒΆ
Represents the possible permission states.
- GRANTED = 'granted'ΒΆ
- DENIED = 'denied'ΒΆ
- PROMPT = 'prompt'ΒΆ
- class selenium.webdriver.common.bidi.permissions.PermissionDescriptor(name: str)[source]ΒΆ
Represents a permission descriptor.
- class selenium.webdriver.common.bidi.permissions.Permissions(conn)[source]ΒΆ
BiDi implementation of the permissions module.
- set_permission(descriptor: str | PermissionDescriptor, state: str, origin: str, user_context: str | None = None) None [source]ΒΆ
Sets a permission state for a given permission descriptor.
Parameters:ΒΆ
- descriptor: The permission name (str) or PermissionDescriptor object.
Examples: βgeolocationβ, βcameraβ, βmicrophoneβ
state: The permission state (granted, denied, prompt). origin: The origin for which the permission is set. user_context: The user context id (optional).
Raises:ΒΆ
ValueError: If the permission state is invalid.