-
Notifications
You must be signed in to change notification settings - Fork 2.3k
IEDriver - Page reload detected during async script #240
Comments
A recent commit has various workarounds for this error but now I'm getting.... 'Error: Error while running testForAngular: Unable to get browser' |
Should be fixed with 81501c5, which will be pushed out in 0.12.1 shortly. |
@juliemr Please can you re-open this issue? I had already tried your latest commits, which were giving the message... 'Error: Error while running testForAngular: Unable to get browser' I did also try 0.12.1 (and the latest files from master) but I'm still getting the same issue. Could it caused by routing? On navigation to the root url of my app, if the user is not logged in an authentication directive will redirect to the login url. Is protractor trying to run an async script that then gets interrupted by a route change? |
Snippet of config... baseUrl: 'http://csdev.cascaid.co.uk' Example test: describe('Simple tests', function () {
it(' should navigate to home page', function () {
browser.get('/');
});
}); |
I run into this problem as well and wrote up issue #251 . |
Looks like this issue: http://stackoverflow.com/questions/12694001/selenium-server-error-unable-to-get-browser Can you try the solutions listed there? |
You are spot on - our corporate GP was disabling Protected Mode on Intranet Zone. The issue that I've now got is #132. So, I'll try the workaround and see how I get on. Thanks. |
You can also configure IEDriver to ignore protected mode settings: |
@penfold , What is that you exactly did to get rid of this issue? IEDriver - Page reload detected during async script |
The same config and scripts work okay with Chrome & Firefox but when using IE, I get the following failure...
Selenium output:
19:34:12.396 INFO - Executing: [new session: {browserName=ie}] at URL: /session)
19:34:12.398 INFO - Creating a new session for Capabilities [{browserName=ie}]
Started InternetExplorerDriver server (32-bit)
2.37.0.0
Listening on port 23442
19:34:15.099 INFO - I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
19:34:15.100 INFO - Retrying request
19:34:15.112 INFO - Done: /session
19:34:15.133 INFO - Executing: [set script timeoutt: 11000] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/timeouts/async_script)
19:34:15.148 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/timeouts
/async_script
19:34:15.236 INFO - Executing: [get: about:blank] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/url)
19:34:15.467 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/url
19:34:15.486 INFO - Executing: [execute script: window.name = "NG_DEFER_BOOTSTRAP!" + window.name;window.location.href = "http://mywebsite.com/#/login", []] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/execute)
19:34:15.580 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/execute
19:34:15.599 INFO - Executing: [execute async script: return (function () {
var attempts = arguments[0];
var callback = arguments[arguments.length - 1];
var check = function(n) {
if (window.angular && window.angular.resumeBootstrap) {
callback(true);
} else if (n < 1) {
callback(false);
} else {
window.setTimeout(function() {check(n - 1)}, 1000);
}
};
check(attempts);
}).apply(null, arguments);, [10]] at URL: /session/95af03d8-7d33-459f-9a8d-2042d
ab2550d/execute_async)
19:34:17.225 WARN - Exception thrown
org.openqa.selenium.WebDriverException: Page reload detected during async script
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.08 seconds
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00'
System info: host: '##########', ip: '#########', os.name: 'Windows 7', os
.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45'
Do you have any suggestions where I can start looking for a solution?
I'm using Protractor 0.12.0. The latest Selenium and IEDriver.
Thanks,
P
The text was updated successfully, but these errors were encountered: