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, overriding commands with browser-specific params. Construct Moz.new(source) for a matching session; other sessions use WebExtension.

Instance Method Summary collapse

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.



119
120
121
122
123
124
125
126
# File 'lib/selenium/webdriver/bidi/protocol/web_extension.rb', line 119

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