我正在关注本教程 http://engineering.wingify.com/posts/e2e-testing-with-webdriverjs-jasmine/
第一部分要求创建 testfile.js
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
driver.get('http://www.wingify.com');
当我运行 node testfile.js 时,我能够让浏览器运行
我创建了 testfile.js
$ 猫 testfile.js
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
describe('basic test', function () {
it('should be on correct page', function () {
driver.get('http://www.wingify.com');
driver.getTitle().then(function(title) {
expect(title).toBe('Wingify');
});
});
});
我到了你运行 jasmine-node 的部分
$ jasmine-node testfile.js
Finished in 0 seconds
0 tests, 0 assertions, 0 failures, 0 skipped
预期的行为是它启动浏览器,但这不是我所经历的。