I have created a simple Angular portal page. On the main page there is a search bar where you can type name of some nba team such as "chicago bulls", "Indiana pacers", etc. After you type the team name and hit submit. You are redirected to the 2nd page where you can read a summary on the team you typed.
I am using angular js and protractor to test my pages. On the first page I did a simple test which passed . I checked simply the title tag is correct
it('should have a title', function() {
browser.get('http://localhost:3000/');
expect(browser.getTitle()).toEqual('NBA | NBA SUMMARY');
});
The title should also be the same on the 2nd page. So i did the following test to check that. I typed in some team name and clicked submit to get to the 2nd page. Here is my code
it('Title should be consistent', function(){
browser.get('http://localhost:3000/');
element(by.css('input')).sendKeys('Chicago Bulls');
element(by.css('button')).click();
expect(browser.getTitle()).toEqual('NBA | NBA SUMMARY');
});
However the 2nd test never ran and it timed out and I got the following message.
Message:
Timed out waiting for Protractor to synchronize with the page after 11 seco
nds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md
Stacktrace:
undefined
Finished in 13.67 seconds
1 test, 1 assertion, 1 failure
Here is my conf.js file code
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['spec.js'],
capabilities: {
browserName: 'chrome'
}
}
Am i missing something? Please advice.