selenium.webdriver.common.bidi.storage¶
Classes
|
Represents a browsing context partition descriptor. |
|
Represents a bytes value. |
|
Represents a cookie. |
|
Represents a filter for cookies. |
|
Represents the result of a deleteCookies command. |
|
Represents the result of a getCookies command. |
|
Represents a partial cookie for setting. |
|
Represents a storage partition key. |
|
Represents the possible same site values for cookies. |
|
Represents the result of a setCookie command. |
|
BiDi implementation of the storage module. |
Represents a storage key partition descriptor. |
- class selenium.webdriver.common.bidi.storage.SameSite[source]¶
Represents the possible same site values for cookies.
- STRICT = 'strict'¶
- LAX = 'lax'¶
- NONE = 'none'¶
- class selenium.webdriver.common.bidi.storage.BytesValue(type: str, value: str)[source]¶
Represents a bytes value.
- TYPE_BASE64 = 'base64'¶
- TYPE_STRING = 'string'¶
- class selenium.webdriver.common.bidi.storage.Cookie(name: str, value: BytesValue, domain: str, path: str | None = None, size: int | None = None, http_only: bool | None = None, secure: bool | None = None, same_site: str | None = None, expiry: int | None = None)[source]¶
Represents a cookie.
- class selenium.webdriver.common.bidi.storage.CookieFilter(name: str | None = None, value: BytesValue | None = None, domain: str | None = None, path: str | None = None, size: int | None = None, http_only: bool | None = None, secure: bool | None = None, same_site: str | None = None, expiry: int | None = None)[source]¶
Represents a filter for cookies.
- class selenium.webdriver.common.bidi.storage.PartitionKey(user_context: str | None = None, source_origin: str | None = None)[source]¶
Represents a storage partition key.
- classmethod from_dict(data: Dict) PartitionKey [source]¶
Creates a PartitionKey instance from a dictionary.
Parameters:¶
data: A dictionary containing the partition key information.
Returns:¶
PartitionKey: A new instance of PartitionKey.
- class selenium.webdriver.common.bidi.storage.BrowsingContextPartitionDescriptor(context: str)[source]¶
Represents a browsing context partition descriptor.
- class selenium.webdriver.common.bidi.storage.StorageKeyPartitionDescriptor(user_context: str | None = None, source_origin: str | None = None)[source]¶
Represents a storage key partition descriptor.
- class selenium.webdriver.common.bidi.storage.PartialCookie(name: str, value: BytesValue, domain: str, path: str | None = None, http_only: bool | None = None, secure: bool | None = None, same_site: str | None = None, expiry: int | None = None)[source]¶
Represents a partial cookie for setting.
- class selenium.webdriver.common.bidi.storage.GetCookiesResult(cookies: List[Cookie], partition_key: PartitionKey)[source]¶
Represents the result of a getCookies command.
- classmethod from_dict(data: Dict) GetCookiesResult [source]¶
Creates a GetCookiesResult instance from a dictionary.
Parameters:¶
data: A dictionary containing the get cookies result information.
Returns:¶
GetCookiesResult: A new instance of GetCookiesResult.
- class selenium.webdriver.common.bidi.storage.SetCookieResult(partition_key: PartitionKey)[source]¶
Represents the result of a setCookie command.
- classmethod from_dict(data: Dict) SetCookieResult [source]¶
Creates a SetCookieResult instance from a dictionary.
Parameters:¶
data: A dictionary containing the set cookie result information.
Returns:¶
SetCookieResult: A new instance of SetCookieResult.
- class selenium.webdriver.common.bidi.storage.DeleteCookiesResult(partition_key: PartitionKey)[source]¶
Represents the result of a deleteCookies command.
- classmethod from_dict(data: Dict) DeleteCookiesResult [source]¶
Creates a DeleteCookiesResult instance from a dictionary.
Parameters:¶
data: A dictionary containing the delete cookies result information.
Returns:¶
DeleteCookiesResult: A new instance of DeleteCookiesResult.
- class selenium.webdriver.common.bidi.storage.Storage(conn)[source]¶
BiDi implementation of the storage module.
- get_cookies(filter: CookieFilter | None = None, partition: BrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor | None = None) GetCookiesResult [source]¶
Retrieves cookies that match the given parameters.
Parameters:¶
filter: Optional filter to match cookies. partition: Optional partition descriptor.
Returns:¶
GetCookiesResult: The result of the get cookies command.
- set_cookie(cookie: PartialCookie, partition: BrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor | None = None) SetCookieResult [source]¶
Sets a cookie in the browser.
Parameters:¶
cookie: The cookie to set. partition: Optional partition descriptor.
Returns:¶
SetCookieResult: The result of the set cookie command.
- delete_cookies(filter: CookieFilter | None = None, partition: BrowsingContextPartitionDescriptor | StorageKeyPartitionDescriptor | None = None) DeleteCookiesResult [source]¶
Deletes cookies that match the given parameters.
Parameters:¶
filter: Optional filter to match cookies to delete. partition: Optional partition descriptor.
Returns:¶
DeleteCookiesResult: The result of the delete cookies command.