【发布时间】:2015-08-05 22:18:38
【问题描述】:
尝试使用 Firefox 浏览器运行量角器测试。这是我的配置文件:
// An example configuration file.
exports.config = {
//directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
},
//chromeOnly:false,
// Framework to use. Jasmine 2 is recommended.
framework: 'jasmine2',
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['example_spec_backup.js'],
seleniumServerJar: 'C:/Users/myname/protractor/protractor-master/chromedriver_win_26.0.1383.0/selenium-server-standalone-2.46.0.jar',
baseUrl: 'http://localhost:9000/',
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
失败:在页面 http://www.angularjs.org/ 上找不到 Angular:重试寻找超出的角度。
这是其中一项测试:
it('should greet the named user', function() {
browser.get('http://www.angularjs.org');
element(by.model('yourName')).sendKeys('Julie');
var greeting = element(by.binding('yourName'));
expect(greeting.getText()).toEqual('Hello Julie!');
});
当我开始测试时,firefox 转到 angularjs.org 但不知何故测试返回错误?
【问题讨论】:
标签: angularjs protractor