我在哪里可以找到所有可用的 ChromeOptions with selenium 的列表?
Where can I find a list of all available ChromeOptions with selenium?
在哪里可以找到所有可用的 Chrome selenium 选项的列表?
在 python 环境中使用 selenium 进行爬网时,我不得不在 chrome 网络驱动程序中使用 flash。
所以我试图找到一个允许 Flash 的设置,并找到了这些答案。
但是我很想找官方文档
关于这些论点:
- profile.default_content_setting_values.plugins
- profile.content_settings.plugin_whitelist.adobe-flash-player
我认为这是存在的,因为有人说了上面两个答案。
但是我找不到它。
以下是使用最广泛的 ChromeDriver 属性和 ChromeOptions 的链接:
- Chrome驱动程序 - Chrome 的 WebDriver:Capabilities & ChromeOptions
- 彼得·贝弗卢:List of Chromium Command Line Switches
- Chromium 项目:Chrome Preferences
- Chromium 项目:Chrome Switches
- 在 chrome 地址栏中打开
chrome://version
打开配置文件路径:的文件夹,会有一个文件perference
复制并打开perference
文件,这是一个JSON文件,可以使用JSON格式器或JSON viewer online。
重要,请打开复制的文件,以免在您进行更改后破坏您的chrome。
我认为profile.content_settings
下flash相关的配置
- 在chrome地址栏中打开
chrome://settings/content/flash
,做你想要的flash设置,你的更改将更新到perference
文件,
- 找出更新的和复制的
perference
文件之间的区别。
区别应该是你想要 chrome 偏好。
- 在构建 ChromeOptions 时设置偏好,例如
profile.content_settings.xxx=xxx
或者,您可以 pre-config 当前用户配置文件中的 flash 设置 (chrome://settings/content/flash
) 并使用用户配置文件构建 ChromeOptions。
部分参考:
- Manage Flash in Chrome
- Default user preferences
- Preferences vs. Policies
- Policy List
- Policy List - DefaultPluginsSetting
策略更接近于使用 registry/system 级别设置来影响一台机器上的所有用户;用户配置文件下的首选项工作只影响一个用户,用户可以使用它来自定义策略设置。但是Policy比Preference有更高的优先级。
在哪里可以找到所有可用的 Chrome selenium 选项的列表?
在 python 环境中使用 selenium 进行爬网时,我不得不在 chrome 网络驱动程序中使用 flash。 所以我试图找到一个允许 Flash 的设置,并找到了这些答案。
但是我很想找官方文档 关于这些论点:
- profile.default_content_setting_values.plugins
- profile.content_settings.plugin_whitelist.adobe-flash-player
我认为这是存在的,因为有人说了上面两个答案。 但是我找不到它。
以下是使用最广泛的 ChromeDriver 属性和 ChromeOptions 的链接:
- Chrome驱动程序 - Chrome 的 WebDriver:Capabilities & ChromeOptions
- 彼得·贝弗卢:List of Chromium Command Line Switches
- Chromium 项目:Chrome Preferences
- Chromium 项目:Chrome Switches
- 在 chrome 地址栏中打开
chrome://version
打开配置文件路径:的文件夹,会有一个文件
perference
复制并打开
perference
文件,这是一个JSON文件,可以使用JSON格式器或JSON viewer online。
重要,请打开复制的文件,以免在您进行更改后破坏您的chrome。我认为
profile.content_settings
下flash相关的配置
- 在chrome地址栏中打开
chrome://settings/content/flash
,做你想要的flash设置,你的更改将更新到perference
文件, - 找出更新的和复制的
perference
文件之间的区别。 区别应该是你想要 chrome 偏好。 - 在构建 ChromeOptions 时设置偏好,例如
profile.content_settings.xxx=xxx
或者,您可以 pre-config 当前用户配置文件中的 flash 设置 (chrome://settings/content/flash
) 并使用用户配置文件构建 ChromeOptions。
部分参考:
- Manage Flash in Chrome
- Default user preferences
- Preferences vs. Policies
- Policy List
- Policy List - DefaultPluginsSetting
策略更接近于使用 registry/system 级别设置来影响一台机器上的所有用户;用户配置文件下的首选项工作只影响一个用户,用户可以使用它来自定义策略设置。但是Policy比Preference有更高的优先级。