marathon-core/ruby-selenium-webdriver/src/main/resources/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/chrome/options.rb
#
# Add an extension by local path.
#
# @example
#   options = Selenium::WebDriver::Chrome::Options.new
#   options.add_extension('/path/to/extension.crx')
#
# @param [String] path The local path to the .crx file
#
Add an extension by local path.
Add an extension by local path .
def add_extension(path)
          raise Error::WebDriverError, "could not find extension at #{path.inspect}" unless File.file?(path)
          raise Error::WebDriverError, "file was not an extension #{path.inspect}" unless File.extname(path) == '.crx'
          @extensions << path
        end
def add_extension ( path ) raise Error :: WebDriverError , "could not find extension at #{path.inspect}" unless File . file? ( path ) raise Error :: WebDriverError , "file was not an extension #{path.inspect}" unless File . extname ( path ) == '.crx' @extensions << path end
Add an extension by local path.
Add an extension by local path .
path
path The local path to the .crx file
path The local path to the . crx file
example
options = Selenium::WebDriver::Chrome::Options.new options.add_extension('/path/to/extension.crx')
options = Selenium :: WebDriver :: Chrome :: Options . new options . add_extension ( ' / path / to / extension . crx ' )