【问题标题】:karate chrome(chromium-browser) driver configurationkarate chrome(chromium-browser) 驱动配置
【发布时间】:2019-03-12 21:30:28
【问题描述】:

我需要在 KarateDSL 场景中启动一个用于 UI 测试的 url。

我已经配置好了,在Feature -> Background:

* configure driver = { type: 'chrome', executable: 'chromesh' }

其中,chromesh~/.local/bin 中的一个可执行(启动铬浏览器)bash 脚本。

在运行时,它似乎总是使用默认的驱动程序配置:

18:38:09.781 [null_1552396089768] ERROR c.intuit.karate.shell.CommandThread - command error: [/Applications/Google Chrome.app/Contents/MacOS/Google Chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/home/../target/null_1552396089768, --headless] - Cannot run program "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" (in directory "target/null_1552396089768"): error=2, No such file or directory

空手道版本:0.9.1

是否有任何我遗漏或做错的配置?

谢谢。

【问题讨论】:

    标签: integration-testing karate


    【解决方案1】:

    您是否使用 IntelliJ - 存在一个已知问题,即它在某些情况下不遵守系统环境变量。

    尝试通过 maven 从命令行运行测试,例如

    mvn test -Dtest=MyJunitRunner
    

    【讨论】:

    • 哦,是的,一直在使用 IntelliJ,将通过 mvn 重试,谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-25
    • 1970-01-01
    • 1970-01-01
    • 2022-12-18
    • 1970-01-01
    • 1970-01-01
    • 2018-10-05
    相关资源
    最近更新 更多