Protractor redirects and times out immediately after loading page
Set baseUrl: 'http://localhost:8100'
in your protractor.config.js
file. From the Protractor Reference Config:
A base URL for your application under test. Calls to protractor.get() with relative paths will be prepended with this.
It is a sporadic open bug in protractor https://github.com/angular/protractor/issues/5103
Instead of this
browser.get('http://juliemr.github.io/protractor-demo/');
Using this has solved my issue.
browser.driver.get('http://juliemr.github.io/protractor-demo/');
I had that problem in chrome. I read somewhere that protractor starts on that data:text/html,<html></html>
page. Calling browser.get(...)
navigates away from that page. My idea was to open chrome already on my base url. I accomplished that by adding it to the capabilities like this:
capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'args': ['--app=www.yourBaseUrl.com'] }},
It's a bit of a hack, but it seems to have done the trick.