We have similar options for the Firefox browser. The way to do that is by including the following two lines:
FirefoxOptions options = new FirefoxOptions();
WebDriver driver = new FirefoxDriver(options);
The Firefox profile is used because when we start the Firefox browser through Selenium using a temp profile with no plugins or bookmarks attached to it. If we want to start Firefox with either of these attached, then we need a Firefox profile. The following short code enables a flash player in Firefox:
FirefoxProfile ffprofile = new FirefoxProfile(); profile.setPreference('dom.ipc.plugins.enabled.libflashplayer.so', 'false'); FirefoxOptions ffoptions = new FirefoxOptions(); options.setProfile(ffprofile);