【问题标题】:Can you set the download path for the Apparition driver?你能设置幻影驱动程序的下载路径吗?
【发布时间】:2019-07-16 12:48:17
【问题描述】:

我正在尝试将我们的验收测试切换到 Capybara/Apparition 驱动程序。我想为下载路径添加特定的 Chrome 浏览器首选项。

我找不到任何关于此的文档,而且从外观上看,我无法像使用 Capybara、Selenium 和 chromedriver 那样使用 Chrome 选项对象,例如:

@options = Selenium::WebDriver::Chrome::Options.new

def specific_chrome_options
  preferences = {
      prompt_for_download: false,
      default_directory: FilesDownloadHelper::PATH # custom profile needed to test file downloads
  }
 
@options.add_preference(:download, preferences)

我尝试使用在运行期间创建的 '--user-data-dir' 参数和首选项文件来设置它,但它似乎没有得到它。

也许驱动程序仍处于测试状态?

【问题讨论】:

    标签: google-chrome capybara apparition


    【解决方案1】:

    使用apparition 下载应该转到Capybara.save_path 设置的任何目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-23
      • 1970-01-01
      • 1970-01-01
      • 2019-06-19
      • 2018-07-12
      • 2016-04-29
      • 1970-01-01
      相关资源
      最近更新 更多