Class: Selenium::WebDriver::BiDi::Protocol::Storage Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/storage.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: PartitionDescriptor

Constant Summary collapse

PartitionKey =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'},
  source_origin: {wire_key: 'sourceOrigin', required: false, primitive: 'string'},
  extensible: true
)
CookieFilter =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', required: false, primitive: 'string'},
  value: {wire_key: 'value', required: false, ref: 'Network::BytesValue'},
  domain: {wire_key: 'domain', required: false, primitive: 'string'},
  path: {wire_key: 'path', required: false, primitive: 'string'},
  size: {wire_key: 'size', required: false},
  http_only: {wire_key: 'httpOnly', required: false, primitive: 'boolean'},
  secure: {wire_key: 'secure', required: false, primitive: 'boolean'},
  same_site: {wire_key: 'sameSite', required: false, enum: 'Network::SAME_SITE'},
  expiry: {wire_key: 'expiry', required: false},
  extensible: true
)
BrowsingContextPartitionDescriptor =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'context'},
  context: 'context'
)
StorageKeyPartitionDescriptor =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'storageKey'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'},
  source_origin: {wire_key: 'sourceOrigin', required: false, primitive: 'string'},
  extensible: true
)
GetCookiesParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  filter: {wire_key: 'filter', required: false, ref: 'Storage::CookieFilter'},
  partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
)
GetCookiesResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  cookies: {wire_key: 'cookies', ref: 'Network::Cookie', list: true},
  partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
)
PartialCookie =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', ref: 'Network::BytesValue'},
  domain: {wire_key: 'domain', primitive: 'string'},
  path: {wire_key: 'path', required: false, primitive: 'string'},
  http_only: {wire_key: 'httpOnly', required: false, primitive: 'boolean'},
  secure: {wire_key: 'secure', required: false, primitive: 'boolean'},
  same_site: {wire_key: 'sameSite', required: false, enum: 'Network::SAME_SITE'},
  expiry: {wire_key: 'expiry', required: false},
  extensible: true
)
SetCookieParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  cookie: {wire_key: 'cookie', ref: 'Storage::PartialCookie'},
  partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
)
SetCookieResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
)
DeleteCookiesParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  filter: {wire_key: 'filter', required: false, ref: 'Storage::CookieFilter'},
  partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
)
DeleteCookiesResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
)

Instance Method Summary collapse

Methods inherited from Domain

#initialize

Constructor Details

This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain

Instance Method Details

#delete_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



135
136
137
138
# File 'lib/selenium/webdriver/bidi/protocol/storage.rb', line 135

def delete_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET)
  params = DeleteCookiesParameters.new(filter: filter, partition: partition)
  execute(cmd: 'storage.deleteCookies', params: params, result: Storage::DeleteCookiesResult)
end

#get_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



142
143
144
145
# File 'lib/selenium/webdriver/bidi/protocol/storage.rb', line 142

def get_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET)
  params = GetCookiesParameters.new(filter: filter, partition: partition)
  execute(cmd: 'storage.getCookies', params: params, result: Storage::GetCookiesResult)
end

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



149
150
151
152
# File 'lib/selenium/webdriver/bidi/protocol/storage.rb', line 149

def set_cookie(cookie:, partition: Serialization::UNSET)
  params = SetCookieParameters.new(cookie: cookie, partition: partition)
  execute(cmd: 'storage.setCookie', params: params, result: Storage::SetCookieResult)
end