【问题标题】:Chrome Executable getting overriden while running the Karate test on a docker container在 docker 容器上运行空手道测试时,Chrome 可执行文件被覆盖
【发布时间】:2020-10-29 20:43:17
【问题描述】:

您可以在下面看到空手道驱动程序的配置如下。之后它尝试使用 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.

【问题讨论】:

    标签: docker ui-automation karate


    【解决方案1】:

    抱歉,您似乎在尝试混合空手道 chrome 并希望它使用 chromedriver。这是不支持的。可执行文件应该是 chrome 可执行文件本身或默认的(推荐)。

    还可以阅读文档。如果使用chrome,您可以将userDataDir: null 添加到配置中,这样它就不会在命令行中使用。

    https://github.com/intuit/karate/tree/master/karate-core#configure-driver

    【讨论】:

      猜你喜欢
      • 2020-10-23
      • 1970-01-01
      • 2021-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多