Recently, my protractor tests have been failing after updating the node_modules. Strangely, it seems like the tests are initiating before the page is fully loaded:
Connecting to the selenium server at http://127.0.0.1:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Spec started
Login
✓ should take me to the homepage
✓ should show the login form
Password > Forgot Password
✓ should go to the forgot password page
✓ should not redirect user if email does not exist
Executed 4 out of 4 specs SUCCESS in 0.025 sec.
Uncaught exception: Error occurred while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability\nhttp://errors.angularjs.org/1.5.8/ng/test"
[launcher] Process exited with error code 1
When I launch Google Chrome, the window opens blank but with the correct URL (http://localhost:8081). However, when I skip running the tests and just use browser.get('/')
, the browser navigates correctly to my web app and the page loads as expected.
I have a suspicion that the tests might be running independently from the synchronization between protractor, selenium, and Chrome, causing asynchronous errors.
Currently, I am using the following versions:
- protractor: 2.5.1
- selenium-server-standalone: 2.47.1 (Tried also with 2.46.0)
- chromedriver: latest version, installed through
webdriver-update
- chrome: 52.0.2743.116