[英]How to scroll horizontally using selenium chromedriver in python
[英]How to enable Flash in Chromedriver 83 using python
I want to turn on flash on URL: http://tropicalatlantic.com/models/models.cgi?basin=al&year=2020&storm=03&display=wind_diagram&run=2020060612
options = webdriver.ChromeOptions()
options.add_argument("--disable-features=EnableEphemeralFlashPermission")
chrome_prefs = {"profile.default_content_setting_values.plugins": 1,
"profile.content_settings.plugin_whitelist.adobe-flash-player": 1,
"profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player": 1,
"PluginsAllowedForUrls": "http://tropicalatlantic.com/"}
options.add_experimental_option("prefs",chrome_prefs)
options.headless = False
options.add_argument('--log-level=3')
options.add_argument('--start-maximized')
options.add_argument('log-level=3')
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
driver1 = webdriver.Chrome(chrome_options=options, service_log_path='NUL')
但是这段代码不起作用
然后我切换了 Internet Explorer。 我使用的是 Internet Explorer 附带的 windows 10。
url = 'http://tropicalatlantic.com/models/models.cgibasin=al&year=2020&storm=03&display=wind_diagram&run=2020060612'
path_to_ie_driver = './iedriver.exe'
driver = webdriver.Ie(path_to_ie_driver)
driver.get(url)
在一些设备上,默认情况下 IE 在缩放条件下打开会引发异常。 您可以在开始浏览之前将其最大化。
driver.maximize_window()
这是IEx64驱动程序的下载链接: IE 64-bit Driver
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.