Chrome 运行 在 docker 容器上进行空手道测试时可执行文件被覆盖
Chrome Executable getting overriden while running the Karate test on a docker container
您可以在下面看到空手道驱动程序被配置为 below.After 它正在尝试使用用户数据目录,然后 location.How 我是否禁用该进程使用 -- 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
添加到配置中,这样它就不会在 command-line.
上使用
https://github.com/intuit/karate/tree/master/karate-core#configure-driver
您可以在下面看到空手道驱动程序被配置为 below.After 它正在尝试使用用户数据目录,然后 location.How 我是否禁用该进程使用 -- 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
添加到配置中,这样它就不会在 command-line.
https://github.com/intuit/karate/tree/master/karate-core#configure-driver