I am trying to write a basic e2e test with protractor. Below is my test. I've added the console.log to see if I can access the URL, the output in the log shows the result of the call to browser.getLocationAbsUrl()
is a promise that is 'pending' (Promise::105 {[[PromiseStatus]]: "pending"}
). The error I get is Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
describe "routes", () ->
it "should automatically redirect to / when location hash/fragment is empty", () ->
browser.navigate 'index.html'
console.log browser.getLocationAbsUrl()
expect(browser.getLocationAbsUrl()).toBe '/'
My config file is simple:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
baseUrl: 'http://localhost:8000',
capabilities: {
'browserName': 'chrome'
},
troubleshoot: true,
specs: ['app/spec/e2e/**/*.coffee']
}
ng-app
is defined? – alecxerootElement: '#html'
to index.html, but it didn't make a difference. I also addedframework: 'jasmine2'
to the config, all that did was give me a stack trace along with the error (the same error message). Previously stack trace wasundefined
. Also tried usingbrowser.waitForAngular
, still got nothing. – Musical ShorerootElement: 'html'
? – alecxebrowser.get
instead ofbrowser.navigate
? – alecxehttp://localhost:8000/index.html
? – alecxe