【发布时间】:2021-10-15 11:50:25
【问题描述】:
我正在尝试为我的网页编写一个空手道 UI 测试,该网页当前具有自签名证书,因此默认情况下被浏览器阻止。 According to the documentation,当 acceptInsecureCerts 参数启用时,应该绕过这个检查。但我找不到将此参数传递给驱动程序的正确语法。这是我的(简化的)功能文件:
Feature: browser automation 1
Background:
* def session = { capabilities: { acceptInsecureCerts: true } }
* configure driver = { type: 'chrome', showDriverLog: true, showProcessLog: true, showBrowserLog: true, webDriverSession: '#(session)' }
Scenario: load demo page
Given driver 'https://127.0.0.1:8443/demo'
* waitUntil('document.readyState == "complete"')
* print 'page loaded'
* screenshot()
Then delay(2000).text('body')
当我运行它时,我得到了
13:31:25.237 [nioEventLoopGroup-2-1] DEBUG c.intuit.karate.driver.DriverOptions - << {"id":9,"result":{"result":{"type":"string","value":"Your connection is not private Attackers might be trying to steal your information from ...
【问题讨论】:
标签: google-chrome testing karate ui-testing