我正在运行一个基于Angularjs的网站 - https://dev.wooter.co/
当我手动打开它时,它会正确打开..但是当我通过自动化打开它时,它只是打开浏览器而没有任何加载..由于我的测试用例失败..
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Stack:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at ontimeout (timers.js:380:14)
at tryOnTimeout (timers.js:244:5)
at Timer.listOnTimeout (timers.js:214:5)
spec.js
describe('Woter Test', function() {
it('should add a Name as WOOTER | Home', function(done) {
browser.get('https://dev.wooter.co/');
expect(browser.getTitle()).toBe('Wooter | Home');
element(by.xpath("//a[@aria-label='SIGN IN']")).click();
//var guru= element(by.xpath('html/body/div[2]/div[1]/div[2]/div[2]/div/h3'));
//expect(guru.getText()).toEqual('Hello change GURU99!');
});
});
conf.js -
exports.config = {
capabilities: {
"browserName": "chrome",
// "chromeOptions": {
// binary: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
// args: [],
//extensions: [],
// }
},
seleniumAddress: 'http://localhost:4444/wd/hub',
onPrepare: function() {
var width = 1600;
var height = 1200;
browser.driver.manage().window().setSize(width, height);
},
specs: ['C:/Users/Desktop/spec.js'],
};