错误:无法找到模块“硒的webdriver” 我已经在全球范围使用 NPM安装-g量角器 webdriver的经理更新安装量角器和硒的webdriver量角器E2E测试错误:无法找到模块“硒的webdriver”
var webdriver = require('selenium-webdriver');
describe('modes of failure', function() {
it('should fail to find a non-existent element', function() {
browser.get('index.html#/form');
// Run this statement before the line which fails. If protractor is run
// with the debugger (protractor debug debugging/conf.js), the test
// will pause after loading the webpage but before trying to find the
// element.
browser.debugger();
// This element doesn't exist, so this fails.
var nonExistant = element(by.binding('nopenopenope')).getText();
});
it('should fail to use protractor on a non-Angular site', function() {
browser.get('http://www.google.com');
}, 20000);
it('should fail an assertion', function() {
browser.get('index.html#/form');
var greeting = element(by.binding('{{greeting}}'));
expect(greeting.getText()).toEqual('This is not what it equals');
});
});
你为什么要要求webriver这样? – glepretre
你可以试着用这个命令行来运行这个例子吗? '量角器node_modules /量角器/ example/conf.js' – glepretre