Run Flash web page in Chrome headless on Ubuntu 14.04

I try to run Cucumber tests with Chrome without problems with Ubuntu 14.04 (EC2 instance without GUI). So far, my setup allows this, as shown in the following screenshot:

Successful screenshot

I have a problem when I come to a flash page:

Flash page

I restarted the EC2 instance and destroyed all the chrome processes, but there is still no joy.

To clarify, the test will begin, and chrome will open the flash page, and I will receive this message. If I then finish the test and start it again, I will get the same problem. I assume this is not restarting chrome, because every time it is a new instance?

So, to run these tests, I use headlessgem here , which acts as an interface to xvfb.

I have Google Chrome 57.0.2987.133and added libflashplayer.soin /opt/google/chrome/pluginsusing this https://askubuntu.com/questions/14629/how-do-i-enable-the-partner-repository

A few additional things I've tried include:

sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install

Is there a way to make this work so that I can create flash sites? Do I need to enable the Flash plugin every time I open chrome? I hope I missed something obvious.

Update

I tried installing pepperflashpluginpathwhile creating a Chrome profile, but this still does not work:

Capybara.register_driver :chrome do |app|
  chrome_binary = '/usr/bin/google-chrome'

  Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => { "binary" => chrome_binary, "args" => ["--ppapi-flash-path=/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so"] })
  Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => capabilities)
end

thank

+4
source share
1 answer

Hope this helps, but where there are 3 key components to make it work

Install Chrome Chromium

sudo apt-get install chromium-browser (at time this installed version 58)

Chrome

/usr/bin/chromium-browser

flash-

https://askubuntu.com/questions/531672/how-to-install-flash-payer-in-ubuntu-14-04-lts

/etc/apt/sources.list

deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

sudo apt-get update
sudo apt-get install adobe-flashplugin

flash

/usr/lib/adobe-flashplugin/libflashplayer.so

Chrome

sudo apt-get install chromium-chromedriver
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

Thats , , , , -, , ,

+4

Source: https://habr.com/ru/post/1674900/


All Articles