Search code examples
c#seleniumflashgeckodriverfirefox-marionette

Geckodriver 0.16.0 start firefox with flashplayer


Since geckodriver v0.16.0 flashplayer is disabled by default. Is there any possibility to start firefox with enabled flashplayer?

I'm using C#. My code right now:

var profileManager = new FirefoxProfileManager();
FirefoxProfile profile = profileManager.GetProfile("selenium"); //created firefox user named selenium
profile.SetPreference("plugin.state.flash", 1);

Code bellow doesn't work for me:

profile.SetPreference("dom.ipc.plugins.enabled.libflashplayer.so", true);

When I use this one:

profile.SetPreference("plugin.state.flash", 1);

firefox is asking if I want to enable flashplayer, and than refreshes page (with all inputs filled previously - so i got empty fields). If I select "allow and remember", next time I start this code nothig is saved. I'm getting the same situation.


Solution

  • I found solution there: How to enable Adobe Flash in FireFox Selenium webdriver with FirefoxProfile

    If I replaced profile.setPreference("plugin.state.flash", 1); to profile.setPreference("plugin.state.flash", 2); it stopped to asking me if I want to enable flash player.