我正在进行我们的自动化测试,但我不知道如何在启用/允许 flash 的情况下启动我们的 Browserstack firefox 浏览器。
firefox 是否有启用/允许 flash 的标志?
我们使用 Karma 作为测试运行器。
我试过了:
var FirefoxProfile = require('firefox-profile');
var myProfile = new FirefoxProfile();
myProfile.setPreference("plugin.state.flash", 2);
myProfile.updatePreferences();
连同:
module.exports = function (config) {
config.set({
basePath: "",
browserNoActivityTimeout: 60000,
browserStack: {
username: "myUsername",
accessKey: "myAccessKey",
forcelocal: true,
timeout: 1000,
firefox_profile: myProfile
},
client: {
mocha: {
timeout: 60000,
ui: interfaceType
},
useIframe: true
},
customLaunchers: {
"bs_chrome_mac": {
base: "BrowserStack",
browser: "chrome",
browser_version: "56",
os: "OS X",
os_version: "Sierra"
},
"firefox-osx" : {
base: "BrowserStack",
browser: "Firefox",
browser_version: "63.0",
os: "OS X",
os_version: "Sierra",
profile: myProfile
},
最佳答案
您可以使用 ProfileManager 启动 firefox,创建启用 flash 和不启用 flash 的配置文件。
firefox -ProfileManager
关于javascript - 是否有命令行标志为 firefox 启用 flash?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53195862/