【发布时间】:2017-09-23 21:52:25
【问题描述】:
由于 geckodriver v0.16.0 flashplayer 默认被禁用。 是否有可能在启用 flashplayer 的情况下启动 firefox?
我正在使用 C#。我现在的代码:
var profileManager = new FirefoxProfileManager();
FirefoxProfile profile = profileManager.GetProfile("selenium"); //created firefox user named selenium
profile.SetPreference("plugin.state.flash", 1);
下面的代码对我不起作用:
profile.SetPreference("dom.ipc.plugins.enabled.libflashplayer.so", true);
当我使用这个时:
profile.SetPreference("plugin.state.flash", 1);
firefox 询问我是否要启用 flashplayer,然后刷新页面(之前填写了所有输入 - 所以我得到了空字段)。 如果我选择“允许并记住”,下次我启动此代码时不会保存任何内容。我也遇到了同样的情况。
【问题讨论】:
-
我昨天用最新的 geckodriver 遇到了同样的问题。我能够暂时切换到 chrome,但也想知道如何解决这个问题。
-
您能否分享您在使用 flashplayer 时遇到问题的网站,以防它是公共网址?
-
我在每一页都有这个问题。例如:adobe.com/swf/software/flash/about/flashAbout_info_small.swf
-
我的问题是您要测试/自动化哪个网站,您要为其启用 flashplayer?
-
很遗憾,我无法链接该网站。但是在所有其他网站上,问题都是一样的。我认为,即使我可以,它也不会改变任何事情。
标签: c# selenium flash geckodriver firefox-marionette