【问题标题】:Disable Chrome Password Manager through Karate framework通过空手道框架禁用 Chrome 密码管理器
【发布时间】:2020-09-17 15:58:52
【问题描述】:

尝试选择正确的 chrome 选项组合以在通过登录表单后禁用烦人的密码管理器弹出窗口。

这是我创建驱动程序的方法:

Feature: Driver initialization

 Background:
   * configure retry = { count: 5, interval: 3000 }

  Scenario Outline: using <config>
    * def config = <config>
    * set config.showDriverLog = true
    * configure driver = config
    * driver 'https://google.com'
    * maximize()
    * retry().waitUntil("document.readyState == 'complete'")

    Examples:
      | config |
      | {type: 'chrome', executable: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', webDriverSession: { desiredCapabilities: { browserName: 'chrome', 'goog:chromeOptions': { credentials_enable_service: false, profile.password_manager_enabled: false }}}} |

我还尝试了与addOptions: [ ... ] 等的其他组合,但没有任何帮助。有什么想法吗?

【问题讨论】:

  • 点击“从不”按钮?这应该留给用户,而不是开发人员。
  • 我们无法直接从驱动程序与该弹出窗口进行交互。它还会在每次新运行时显示,因为每个新驱动程序都是从头开始配置的。

标签: karate


【解决方案1】:

我遇到了类似的问题,但我找到了解决方法。与其使用驱动程序类型为 chrome 并指向本地安装的 google chrome 应用程序,不如下载 chromedriver 并使用它。我在 Windows 上使用它并将 chromedriver 放在 C:/Windows/ 文件夹下。这在执行测试时没有弹出密码管理器。

【讨论】:

    【解决方案2】:

    我听说使用隐身模式可以解决这个问题。

    【讨论】:

    • 哈哈,是的,那行得通。不确定这是否是正确的方法,但我的问题已解决。
    猜你喜欢
    • 2019-11-16
    • 2017-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多