【发布时间】:2020-04-14 12:46:59
【问题描述】:
我正在将 Selenium 与 Python 一起用于一些在线相机接口。问题是我似乎无法在 Selenium 的 Chrome 中激活 Flash。
我发现问题与我的问题很接近,但没有一个解决方案有效: https://sqa.stackexchange.com/questions/30312/enable-flash-player-on-chrome-62-while-running-selenium-test
我尝试的参数都没有改变,我得到的只是“获取 Flash Player”链接
这是我的代码:
chrome_options = Options()
prefs = {
"profile.default_content_setting_values.plugins" : "1",
"profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-
player" : "1",
"PluginsAllowedForUrls": "ADRESS"
//The player is in a frame, I tried to pass both the host and the framed page
}
chrome_options.add_argument("--disable-web-security")
chrome_options.add_argument("--allow-running-insecure-content")
chrome_options.add_experimental_option("prefs",prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)
谢谢
【问题讨论】:
-
这是我之前看到的讨论之一,我不知道我是否执行这些正确,但它不会改变任何东西
-
如果它是公共网址,您可以分享网址吗?
-
这不是公共网址,对不起
标签: python selenium selenium-chromedriver