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

Inherits:
WebExtension
  • Object
show all
Defined in:
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.

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.



149
150
151
152
153
154
155
156
# File 'lib/selenium/webdriver/bidi/protocol/web_extension.rb', line 149

def install(extension_data:, allow_private_browsing: Serialization::UNSET, permanent: Serialization::UNSET)
  extensions = {
    'moz:allowPrivateBrowsing' => allow_private_browsing,
    'moz:permanent' => permanent
  }.reject { |_, value| Serialization::UNSET.equal?(value) }
  params = InstallParameters.new(extension_data: extension_data, extensions: extensions)
  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.



160
161
162
# File 'lib/selenium/webdriver/bidi/protocol/web_extension.rb', line 160

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