我需要一种自动化的方式来在 Firefox Selenium webdriver 中启用 Flash,而无需用户交互。
我努力了:
FirefoxProfile profile = new FirefoxProfile();
//As 0 is to disable, I used 1. I don"t know what to use.
profile.setPreference("plugin.state.flash", 1);
WebDriver driver = new FirefoxDriver(profile);
但这仍然需要我单击“允许”。