Class: Selenium::WebDriver::BiDi::Protocol::WebExtension::Moz Private

Inherits:
WebExtension
  • Object
show all
Defined in:
rb/lib/selenium/webdriver/bidi/protocol/web_extension.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.

moz: vendor variant of WebExtension, with browser-specific commands and params. Construct Moz.new(source) for a matching session; other sessions use WebExtension.

Constant Summary collapse

InstallParameters =

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(
  extension_data: {wire_key: 'extensionData', ref: 'WebExtension::ExtensionData'},
  allow_private_browsing: {wire_key: 'moz:allowPrivateBrowsing', required: false, primitive: 'boolean'},
  permanent: {wire_key: 'moz:permanent', required: false, primitive: 'boolean'}
)

Instance Attribute Summary

Attributes inherited from WebExtension

#id

Instance Method Summary collapse

Methods inherited from WebExtension

#initialize

Constructor Details

This class inherits a constructor from Selenium::WebDriver::WebExtension

Instance Method Details

#install(extension_data:, allow_private_browsing: Serialization::UNSET, permanent: 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.



157
158
159
160
161
162
163
164
# File 'rb/lib/selenium/webdriver/bidi/protocol/web_extension.rb', line 157

def install(extension_data:, allow_private_browsing: Serialization::UNSET, permanent: Serialization::UNSET)
  params = InstallParameters.new(
    extension_data: extension_data,
    allow_private_browsing: allow_private_browsing,
    permanent: permanent
  )
  execute(cmd: 'webExtension.install', params: params, result: WebExtension::InstallResult)
end

#list_extensions ⇒ 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.



168
169
170
# File 'rb/lib/selenium/webdriver/bidi/protocol/web_extension.rb', line 168

def list_extensions
  execute(cmd: 'webExtension.moz:listExtensions', result: WebExtension::MozListExtensionsResult)
end