viff
viff copied to clipboard
运行https://github.com/winsonwq/viff-examples上的demo报错
js如下: 'use strict' var config = module.exports = { seleniumHost: 'http://localhost:4444/wd/hub', browsers: ['chrome'], envHosts: { build: 'http://localhost:80/example/build', prod: 'http://localhost:80/example/prod' }, paths: [], reportFormat: 'file', test: function test (description, caseConfig) { var c = {}; c[description] = caseConfig; this.paths.push(c); } }; config.test('Home Page', ['/github.html', function (browser) { return browser.waitForElementByCssSelector('.repo-list-item', browser.isDisplayed()); }]); config.test('Search Result', ['/github.html', function (browser) { return browser .waitForElementByCssSelector('.repo-list-item', browser.isDisplayed()) .elementByCssSelector('[type="search"]').type('commander.js') .sleep(1000); }]); config.test('Open Readme file', ['/github.html', function (browser) { return browser .waitForElementByCssSelector('.repo-list-item', browser.isDisplayed()) .elementByCssSelector('.repo-list-item:nth-child(2)').click() .waitForElementByCssSelector('.repo-readme', browser.isDisplayed()); }])
报错信息如下:
D:\test>viff build_prod.config.js Viff is taking screenshots...
phantom stderr: 'phantomjs.cmd' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���
assert.js:92
throw new assert.AssertionError({
^
AssertionError: abnormal phantomjs exit code: 1
at Console.assert (console.js:102:23)
at ChildProcess.