下面您可以看到空手道驱动程序的配置如下。之后它尝试使用 user-data-dir,然后是位置。如何使用 --user-data-dir 作为 Chrome 可执行路径来禁用该进程:
build-env_1 | 12:10:42.702 [ForkJoinPool-1-worker-1] INFO com.intuit.karate - Karate Driver config:
build-env_1 | {
build-env_1 | "type": "chrome",
build-env_1 | "executable": "/usr/bin/karate_chrome_driver",
build-env_1 | "port": 9515,
build-env_1 | "httpConfig": {
build-env_1 | "readTimeout": 120000
build-env_1 | }
build-env_1 | }
build-env_1 | 12:10:42.727 [ForkJoinPool-1-worker-1] WARN com.intuit.karate - type was null, defaulting to 'chrome'
build-env_1 | 12:10:42.754 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate.shell.Command - found / verified free local port: 9222
build-env_1 | 12:10:42.759 [chrome_1603973442746] DEBUG c.i.k.driver.chrome_1603973442746 - command: [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/usr/regression/target/chrome_1603973442746, --disable-popup-blocking]
build-env_1 | 12:10:42.762 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1603973442746 - poll attempt #0 for port to be ready - localhost:9222
build-env_1 | 12:10:42.762 [chrome_1603973442746] ERROR com.intuit.karate.shell.Command - command error: [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/usr/regression/target/chrome_1603973442746, --disable-popup-blocking] - Cannot run program "/usr/bin/google-chrome" (in directory "target/chrome_1603973442746"): error=2, No such file or directory.
抱歉,您似乎正在尝试混合空手道chrome
并期望它使用chromedriver
。不支持此操作。可执行文件应该是 chrome 可执行文件本身或默认的(推荐)。
另请阅读文档。如果使用chrome
你可以加userDataDir: null
到配置中,这样它就不会在命令行上使用。
https://github.com/intuit/karate/tree/master/karate-core#configure-driver
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)