mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.21k stars 1.53k forks source link

Gecko driver issue v 0.29 while playing video #1864

Open raamojirao opened 3 years ago

raamojirao commented 3 years ago

System

Description

We are using webdriver and Ruby to run automation. We are doing video automation testing on Firefox and while playing the video, it keeps buffering and Firefox throws the message at the top of the video - Firefox is installing components needed to play the audio or video on this page. Please try again later.

Screen Shot 2021-04-08 at 12 23 04 PM

I have tried passing these preferences and it doesn't work

caps = Selenium::WebDriver::Remote::Capabilities.firefox("moz:firefoxOptions" => {"prefs" => [{"media.autoplay.default" => 0,
                                                                                              "media.eme.enabled" => true,
                                                                                              "media.gmp-gmpopenh264.provider.enabled" => true,
                                                                                              "media.gmp-gmpopenh264.enabled" => true,
                                                                                              "media.gmp-widevinecdm.enabled" => true,
                                                                                              "media.gmp-manager.updateEnabled" => true,
                                                                                              "media.gmp-provider.enabled" => true,
                                                                                              "media.openh264.providerEnabled" => true,
                                                                                              "media.peerconnection.video.h264_enabled" => true,
                                                                                              "media.gmp.decoder.enabled" => true,
                                                                                              "media.navigator.streams.fake"=> true,
                                                                                              "media.navigator.permission.disabled"=> true}]})
Capybara.register_driver driver_name.to_sym do |app|
    client = Selenium::WebDriver::Remote::Http::Default.new
    client.timeout = 500
    Capybara::Selenium::Driver.new(app,
                                   :browser => browser_name.to_sym,
                                   :desired_capabilities => caps)
  end

Please suggest what needs to be done

Crypto90 commented 3 years ago

Experiencing the same issue.

Tested with: geckodriver : versions 0.29.1 - 0.26.0 which all fail to load the widevine module. Firefox: 78.8.0esr Firefox: 78.10.0esr Selenium: 3.142.0

I think a recent firefox update caused this because we had 0.26.0 working fine for some months with an older firefox version.