Problem to enable Flash via FireFox Profile

20 views
Skip to first unread message

sabf

unread,
Oct 9, 2017, 2:04:07 AM10/9/17
to Selenium Users
Hello,

we are trying to active the Flash PlugIn in FireFox by a profile, but it does not work correct.
If I debug the test, which uses the FireFox profile the Flash PlugIn is not enabled and the depending test fail.

Here is the code where I enable the Flash PlugIn in the FireFox profile:

@BeforeSuite(alwaysRun = true)
@Parameters({"..."})
protected void startSession(someParameter) throws Exception {
   
...
   capability = DesiredCapabilities.firefox();
   capability.setCapability("marionette", true);
   
FirefoxProfile firefoxProfile = new FirefoxProfile();
   firefoxProfile
.setPreference("dom.ipc.plugins.enabled.libflashplayer.so","true");
   firefoxProfile
.setPreference("plugin.state.flash", 2);
   firefoxProfile
= disableCookiesOnEGBToTestCookieFirefox(egbVariant, usedTestGroups, firefoxProfile);
   capability.setCapability(FirefoxDriver.PROFILE, firefoxProfile);
 
...
}


@BeforeMethod(alwaysRun = true)
protected void beforeMethod() {
       
assertThat("Testclient " + seleniumHost + " could not be reached. Test will be aborted. Ignore Teardown error.", checkHostReachable(remoteSeleniumGridConsoleUrl), is(true));
       
driver = new RemoteWebDriver(remoteSeleniumHubUrl, capability);
       
driver = new Augmenter().augment(driver);

        SeleniumTestBase.getDriver().manage().window().setSize(new Dimension(1440, 900));
       
standardWaitTime = new WebDriverWait(driver, 70);
       
SeleniumTestBase.getDriver().manage().deleteAllCookies();
       
SeleniumTestBase.getDriver().get(website);
...
}



And yes we are still using Flash on our website, but we will change it step by step ;-)

Environment:
FireFox: 56.0 (64-Bit)
geckodriver: 0.19.0
webdriver: 3.5.3
Windows 10
Reply all
Reply to author
Forward
0 new messages