Module: Selenium::WebDriver::DriverExtensions::DownloadsFiles Private

Defined in:
lib/selenium/webdriver/common/driver_extensions/downloads_files.rb

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

Instance Method Summary collapse

Instance Method Details

#download_path=(path) ⇒ 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.

Sets download path for Chromium.

Parameters:

  • path (String)


30
31
32
33
34
35
36
37
38
39
# File 'lib/selenium/webdriver/common/driver_extensions/downloads_files.rb', line 30

def download_path=(path)
  params = {
    'cmd' => 'Page.setDownloadBehavior',
    'params' => {
      'behavior' => 'allow',
      'downloadPath' => path
    }
  }
  @bridge.send_command(params)
end