我这里的用例有两个:
~/Downloads)。发布于 2017-11-14 10:41:56
将以下内容打包到spec_helper.rb中
config.before(:each, type: :system, js: true) do
desired_capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
'chromeOptions' => {
'prefs' => {
'download.default_directory' => Rails.root.join('spec/downloads'),
'download.prompt_for_download' => false,
'plugins.plugins_disabled' => ["Chrome PDF Viewer"]
}
}
)
driven_by :selenium, using: :chrome, options: { desired_capabilities: desired_capabilities }
end看哪!
https://stackoverflow.com/questions/47283608
复制相似问题