以火狐浏览器为例

 

目录

1、找到配置项

2、读取配置

 

 

1、找到配置项

打开Firefox点右上角设置>?(帮助)>故障排除信息>显示文件夹,复制文件管理器地址栏

UI自动化之读取浏览器配置

UI自动化之读取浏览器配置

 

2、读取配置

FirefoxProfile() 方法读取配置,然后再加载配置

pro=r'C:\Users\mine\AppData\Roaming\Mozilla\Firefox\Profiles\yc9hakzy.default'
profile=Web_driver.FirefoxProfile(pro)
driver=Web_driver.Firefox(profile)

 这时候得到的driver就是加载了浏览器配置的

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2021-05-15
  • 2021-10-21
  • 2022-12-23
  • 2021-08-03
  • 2021-11-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-12-24
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案