无法使用无头镀铬进行量角器测试

时间:2017-09-13 14:28:48

标签: protractor google-chrome-headless

前段时间谷歌announced that headless chrome is available in newest chrome versionsOver there我们可以找到带有量角器的无头镀铬配置。

当我尝试使用directConnect运行我的测试套件时 - 一切都像魅力一样。 功能看起来像这样:

    capabilities: {
        browserName: 'chrome',
        chromeOptions: {
            args: ['--start-maximized']            
        }
    },

当我将args行更改为:

args: ['--start-maximized', '--headless', '--disable-gpu']

并运行测试,我收到错误:

 E/protractor - Could not find Angular on page https://address.com/ : retries looking for angular exceeded
Unhandled rejection Error: Angular could not be found on the page https://address.com/.If this is not an Angular application, you may need to turn off waiting for Angular.
Please see 
https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load
    at executeAsyncScript_.then (/home/user/Projects/pef/tests/e2e/node_modules/protractor/lib/browser.ts:936:29)
    at ManagedPromise.invokeCallback_ (/home/user/Projects/pef/tests/e2e/node_modules/selenium-webdriver/lib/promise.js:1366:14)
    at TaskQueue.execute_ (/home/user/Projects/pef/tests/e2e/node_modules/selenium-webdriver/lib/promise.js:2970:14)
    at TaskQueue.executeNext_ (/home/user/Projects/pef/tests/e2e/node_modules/selenium-webdriver/lib/promise.js:2953:27)
    at asyncRun (/home/user/Projects/pef/tests/e2e/node_modules/selenium-webdriver/lib/promise.js:2813:27)
    at /home/user/Projects/pef/tests/e2e/node_modules/selenium-webdriver/lib/promise.js:676:7
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

有人遇到过这个问题吗?

node:v8.4.0

npm:5.3.0

chrome:60.0.3112.113

量角器:5.1.2

0 个答案:

没有答案