TestCafe无法在浏览器上启动工作程序(chrome)

时间:2018-09-26 21:38:25

标签: google-chrome testcafe

我正在尝试让TestCafe进行非常简单的测试。我的操作系统是Ubuntu 16.04 LTS。

我的浏览器设置如下: 浏览器名称:google-chrome-stable 路径:/ usr / bin / google-chrome-stable

没有命令行选项。

我还通过在/ usr / bin文件夹中执行ls -lsa来验证chrome是否在该位置,

0 lrwxrwxrwx 1根根32 Jun 22 11:14 google-chrome-stable-> / opt / google / chrome / google-chrome

所以我看到它是具有完全权限的符号链接

我的测试装置是:http://orchestra.updatepromise(可以在网上公开获得),并且我已经设置了以下测试:

"@fixture test fixture";
"@page https://orchestra.updatepromise";

"@test"["log in"] = {
    '1.Type in input "username"': function() {
        var actionTarget = function() {
            return $("[name='form'].ng-untouched.ng-pristine.ng-invalid").find("[name='username']");
        };
        act.type(actionTarget, "dealer_admin");
    },
    '2.Type in password input "password"': function() {
        var actionTarget = function() {
            return $("[name='form'].ng-untouched.ng-invalid.ng-dirty").find("[name='password']");
        };
        act.type(actionTarget, "NopeNoPasswordHere");
    },
    '3.Click submit button "Log In"': function() {
        act.click(".btn.btn-primary");
    }
};

当我运行此测试时。我得到以下输出:

无法启动任务

无法在浏览器“ google-chrome-stable”上启动工作程序。如果在初始化工作程序之前关闭了浏览器,或者由于浏览器挂起,可能会发生这种情况。

不确定我在做什么错

附录:

此外,我遇到了另一个可能与铬有关的问题。当我不时打开带有多个标签的chrome浏览器时,标签和页眉全部变为黑色,我什么也无法选择。我调查了一下,其他人也遇到了同样的问题,他们似乎通过像这样从命令启动chrome来解决了这个问题:

google-chrome --use-gl =角度&

考虑到这一点,我在testcafe中添加了一个新的浏览器定义,该定义在命令行选项中添加了--use-gl = angle&。不幸的是,这个也失败了,并且有同样的错误

0 个答案:

没有答案