【发布时间】:2015-06-01 19:29:06
【问题描述】:
我正在编写简单的量角器测试四个我们的应用程序:
- 登录页面没有 angularhs - 工作正常
- 所有其他页面都使用 angularjs
当我想编写 angularhs 测试时 - 我收到了这个错误(在this 安装之后):
Timed out waiting for Protractor to synchronize with the page after 40002ms. Please see https://github.com/angular/protractor/blob/master/docs/faq.md
配置:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['login-spec.js'],
baseUrl: 'https:/xyz/',
allScriptsTimeout: 40000,
capabilities: {
'browserName': 'firefox'
}
}
还有我的规格:
describe('Login #1', function() {
// BEFORE LOGIN
it('should pass to next login step', function() {
browser.driver.get('https://xyz/login');
browser.driver.findElement(by.css(".factorFirst > [name='username']:first-child")).sendKeys('123456');
.... other login stuff
}, 90000);
// AFTER LOGIN TEST
it('Simple Angular Test', function() {
browser.get('/page');
element(by.model('payment.userSpecified.message')).sendKeys(1);
}, 45000);
});
我们的body 元素属性中没有ng-app。这会是个问题吗?
【问题讨论】:
标签: javascript angularjs testing protractor end-to-end