I want to use Chrome in my Test on Webdriver + Ruby to download files on remote computers. On my developer computer everything works fine with this code:
profile = Selenium::WebDriver::Chrome::Profile.new
profile[ download.prompt_for_download ] = false
profile[ download.default_directory ] = Settings::DEFAULT_DOWNLOAD_DIRECTORY
@@driver = Selenium::WebDriver.for :chrome, :profile => profile
但我想在几台遥控机器上使用运行代码 并使用这个代码
profile = Selenium::WebDriver::Chrome::Profile.new
profile[ download.prompt_for_download ] = false
profile[ download.default_directory ] = "/mnt/samba/share_location/"
caps = Selenium::WebDriver::Remote::Capabilities.chrome(:profile => profile)
@@driver = Selenium::WebDriver.for(:remote, :url => "http://" +remote_server + ":4444/wd/hub", :desired_capabilities => caps)
第二个变异变量没有起作用, 浏览器下载文件, 默认在每台远程计算机上下载动作 。
求求你,帮我修好这个