python – 在哪里可以找到所有可用的硒选项的列表?

我在哪里可以找到所有可用的硒选项的列表?

python环境中使用selenium爬行时,我不得不在chrome webdriver中使用flash.
所以我试图找到一个允许Flash的设置,我找到了这些答案.

https://sqa.stackexchange.com/questions/30312/enable-flash-player-on-chrome-62-while-running-selenium-test

Selenium.Chrome where can I find a list of all available ChromeOption arguments? C#

但我真的很想找到官方文件
关于这些论点:

> profile.default_content_setting_values.plugins
> profile.content_settings.plugin_whitelist.adobe-flash-player

我认为存在是因为有些人说上面两个答案.
但我找不到它.

解决方法:

>在chrome地址栏中打开chrome://版本
>打开Profile Path:的文件夹,会有一个文件引用

enter image description here


>复制并打开perference文件,它是一个JSON文件,你可以使用JSON formater或JSON viewer online.
重要的是,请打开复制的一个,以避免在您进行更改时破坏您的Chrome.
>我认为配置文件与profile.content_settings下的flash相关
>在chrome地址栏中打开chrome:// settings / content / flash,如果想要设置flash,你的更改将更新为perference文件,
>找出更新和复制的perference文件间的区别.
不同之处应该是你想要的Chrome优惠.
>在构建ChromeOptions时设置权限,例如profile.content_settings.xxx = xxx

enter image description here

或者,您可以在当前用户配置文件中预先配置闪存设置(chrome:// settings / content / flash),并使用用户配置文件构建ChromeOptions.

enter image description here

一些参考:

> Manage Flash in Chrome
> Default user preferences
> Preferences vs. Policies
> Policy List
> Policy List – DefaultPluginsSetting

策略更接近于使用注册表/系统级别设置来影响一台计算机中的所有用户;用户配置文件下的首选项工作仅影响一个用户,用户可以使用它来自定义策略设置.但政策优先于偏好.

相关文章

转载地址:https://www.cnblogs.com/mini-monkey/p/12104821...
web自动化测试过程中页面截图相对比较简单,可以直接使用sel...
目录前言一、Selenium简介二、浏览器驱动1.浏览器驱动参考2....
一、iframe的含义:iframe是HTML中框架的一种形式,在对界面...
转载请注明出处❤️作者:测试蔡坨坨原文链接:caituotuo.to...
'''##**认识selenium**​**下载:pipinstall...