-
Notifications
You must be signed in to change notification settings - Fork 2.3k
timeout after 5000 msec #88
Comments
Looks like you have the timeout on a var util = require('util');
describe('Login', function() {
var ptor;
beforeEach(function() {
ptor = protractor.getInstance();
ptor.get('#/login');
});
it('allows user to log in', function() {
var expectedUrl = ptor.baseurl + '/#/missioncontrol';
ptor.findElement(protractor.By.input('login')).sendKeys('login');
ptor.findElement(protractor.By.input('password')).sendKeys('password');
ptor.findElement(protractor.By.css('input.login-form-container-button')).click()
ptor.getCurrentUrl().
then(function(url) {
expect(url).toBe(expectedUrl);
});
}, 30000);
}); You're also getting an instance of protractor during |
@stickel I tried your suggestion but its not resolving to the url intended.. If the url is not resolved i wont be able to find the elements on the intended 'http://example.com/#/missioncontrol'. after the successful login |
Does your login page have angular.js loaded on it? If it doesn't, protractor may time out while trying to find angular. Try increasing the timeout on beforeEach and seeing if the error message changes:
|
Sounds like the test isn't timing out now there's just a failing test, correct? When the tests are running does the browser show text being entered in login/password fields? Does the app work correctly when you enter the same information in manually? |
@juliemr angular.js is loaded on the login page. The timeout is not occurring anymore. |
@stickel Yes when i enter all the details manually its working fine... When i run the test it opens the browser and performs the entering of the text in login/password fields. Also i see the url with baseUrl + '#/missioncontrol'. Its still resolving the currentUrl to be baseUrl + '#/login'. Thats why the test is failing. |
If i try to waitForAngular(), it times out again... |
@apankov1 It seems like its not working correctly |
Made a separate bug to consolidate these issues - now duplicate of #92 |
Julie, you are my goddess. |
Hi there, I ended here because I am confused about how the timing works. Are those milliseconds in the |
Property 'getInstance' does not exist on type 'Ptor'. |
I am really new at this. When i click the login button It logs in and then i wait for angular to finish. but its timing out for some reason.
The code is:
Error that i get:
Failures:
Message:
timeout: timed out after 5000 msec waiting for spec to complete
Stacktrace:
undefined
Finished in 8.685 seconds
1 test, 1 assertion, 1 failure
Shutting down selenium standalone server
/Users/ranjanbhambroo/Documents/protractor_voloforce_tests/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1542
throw error;
^
ScriptTimeoutError: Timed out waiting for async script result after 99953ms
The text was updated successfully, but these errors were encountered: