3

ここに画像の説明を入力Firefox - 51.0.1 セレン - 3.0.5 Ubuntu - 16.04 (64 ビット)

私のコードは次のようになります。

profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.dir'] = "/tmp/webdriver-downloads"
profile['browser.download.folderList'] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = "application/pdf"
profile['pdfjs.disabled'] = true

driver = Selenium::WebDriver.for :firefox, :profile => profile
driver.get "https://s3.amazonaws.com/shopsocially-misc/vfs/vfs_test_sample.csv"

上記のコードを実行すると、ポップアップが表示されます。

これは私が得るエラーです:

Selenium::WebDriver::Error::UnknownError: Failed to decode response from marionette
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/http/common.rb:85:in `new'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/http/common.rb:85:in `create_response'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/http/default.rb:107:in `request'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/http/common.rb:63:in `call'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/w3c_bridge.rb:640:in `raw_execute'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/w3c_bridge.rb:615:in `execute'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/remote/w3c_bridge.rb:126:in `get'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/navigation.rb:32:in `to'
    from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/driver.rb:132:in `get'
    from (irb):70
    from /usr/bin/irb:11:in `<main>'

私が試した限りでは、使用している新しいバージョンに問題があるようです。間違っている場合は修正してください。

4

1 に答える 1