在尝试设置量角器以在Internet Explorer中运行测试时,出现以下错误。什么都没运行,尝试开始使用命令protractor conf.js
时出现以下错误。
[14:19:47] I/launcher - Running 1 instances of WebDriver
[14:19:47] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[14:19:47] E/launcher - Unable to create new service: InternetExplorerDriverServ
ice
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25
:53'
System info: host: 'PCN0456609', ip: '172.29.54.56', os.name: 'Windows 7', os.ar
ch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: driver.version: unknown
[14:19:47] E/launcher - SessionNotCreatedError: Unable to create new service: In
ternetExplorerDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25
:53'
以下是我的conf.js
文件-
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js'],
multiCapabilities : [
{
'browserName' : 'internet explorer'
}
]
};
以下是我的测试规格-
describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('https://angularjs.org');
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});