【问题标题】:how to disable '' Do you want to save password for this site' chrome popup in selenium webdriver如何在 selenium webdriver 中禁用“是否要保存此站点的密码”chrome 弹出窗口
【发布时间】:2017-03-16 05:54:13
【问题描述】:

我的 chrome 升级到了 57 版,现在我的脚本由于保存密码弹出窗口而无法运行。 我尝试使用 chrome 设置,但每次运行我的脚本时,保存的设置在新打开的浏览器中不起作用。有什么解决办法吗?

【问题讨论】:

    标签: java google-chrome selenium-webdriver


    【解决方案1】:

    它对我有用:

    ChromeOptions options = new ChromeOptions();
    Map<String, Object> prefs = new HashMap<String, Object>();
    prefs.put("credentials_enable_service", false);
    options.setExperimentalOption("prefs", prefs);
    

    【讨论】:

      猜你喜欢
      • 2018-03-17
      • 2020-11-21
      • 2019-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-17
      • 2017-12-28
      • 1970-01-01
      相关资源
      最近更新 更多