I have a functional test failing in IE10/Win8 on BrowserStack which has been driving me crazy. I ended up adding a few log statements to dojo/request/node in order to narrow down the problem.
The first code block shows .findById("first").click().end()
that works fine (test), the second code block shows the problem (test). The request is taking ages and eventually fails.
The BrowserStack config is reduced to IE10 and IE11 and the only suite that is executed is element.disabled.test.js.
A few sessions that failed:
- https://www.browserstack.com/automate/builds/e917f05ad1e7bd6dcf85acf68ffd36df1f8f0fc4/sessions/f73f958e1fb2c66a554a9541c33675c159a91699#automate_button
- https://www.browserstack.com/automate/builds/e917f05ad1e7bd6dcf85acf68ffd36df1f8f0fc4/sessions/7771eeea5de7a44eac7b9086d35b54b32037e1e7#automate_button
- https://www.browserstack.com/automate/builds/e917f05ad1e7bd6dcf85acf68ffd36df1f8f0fc4/sessions/928ddc46f49be4e72d6f77fbb8fe2d7315ca6e85#automate_button
The branch in which the click failure occurs contains refactorings that should not concern Intern or the BrowserStack VMs. The document used by the failing test works fine when opened directly in IE10 (i.e. not via WebDriver).
The test (clicking the element) works when removing the nativeEvents option from the IE10 profile, as this session shows. But if I do that, other tests fail.
The test (clicking the element) also works fine when these lines (everything but the “svg*”) are commented out. I have no idea why removing that code should make a difference. It certainly doesn when IE10 is used directly.
--
Here's the successful part for comparison with the problematic attempt below
#
# Request 1: obtain the element
#
dojo/request https://<auth>@hub.browserstack.com:443/wd/hub/session/<session>/element
{
followRedirects: false,
handleAs: 'text',
headers: {
Accept: 'application/json,text/plain;q=0.9',
'Content-Type': 'application/json;charset=UTF-8',
'Content-Length': 30
},
method: 'POST',
data: '{"using":"id","value":"first"}'
}
dojo/request response
status: 200
total: 173
headers: {
server: 'nginx/1.6.2',
date: 'Tue, 21 Jun 2016 21:21:17 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '173',
connection: 'close',
expires: 'Thu, 01 Jan 1970 00:00:00 GMT, Thu, 01 Jan 1970 00:00:00 GMT',
'cache-control': 'no-cache, no-cache'
}
dojo/request data
loaded: 173
chunk: {"state":"success","sessionId":"<session>","hCode":10384507,"value":{"ELEMENT":"14"},"class":"org.openqa.selenium.remote.Response","status":0}
dojo/request end
#
# Request 2: click the element
#
dojo/request https://<auth>@hub.browserstack.com:443/wd/hub/session/<session>/element/14/click
{
followRedirects: false,
handleAs: 'text',
headers: {
Accept: 'application/json,text/plain;q=0.9',
'Content-Length': 0
},
method: 'POST'
}
dojo/request response
status: 200
total: 161
header: {
server: 'nginx/1.6.2',
date: 'Tue, 21 Jun 2016 21:21:17 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '161',
connection: 'close',
expires: 'Thu, 01 Jan 1970 00:00:00 GMT, Thu, 01 Jan 1970 00:00:00 GMT',
'cache-control': 'no-cache, no-cache'
}
dojo/request data
loaded: 161
chunk: {"state":"success","sessionId":"<session>","hCode":32561411,"value":null,"class":"org.openqa.selenium.remote.Response","status":0}
dojo/request end
And here's the second attempt to click an element. Note how the response of the request for click does not contain content-length
header (which dojo/request/node turns into NaN
and fails miserably):
#
# Request 1: obtain the element
#
dojo/request https://<auth>@hub.browserstack.com:443/wd/hub/session/<session>/element
{
followRedirects: false,
handleAs: 'text',
headers: {
Accept: 'application/json,text/plain;q=0.9',
'Content-Type': 'application/json;charset=UTF-8',
'Content-Length': 31
},
method: 'POST',
data: '{"using":"id","value":"before"}'
}
dojo/request response
status: 200
total: 173
headers: {
server: 'nginx/1.6.2',
date: 'Tue, 21 Jun 2016 21:21:28 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '173',
connection: 'close',
expires: 'Thu, 01 Jan 1970 00:00:00 GMT, Thu, 01 Jan 1970 00:00:00 GMT',
'cache-control': 'no-cache, no-cache'
}
dojo/request data
loaded: 173
chunk: {"state":"success","sessionId":"<session>","hCode":20398814,"value":{"ELEMENT":"15"},"class":"org.openqa.selenium.remote.Response","status":0}
dojo/request end
#
# Request 2: click the element
#
dojo/request https://<auth>@hub.browserstack.com:443/wd/hub/session/<session>/element/15/click
{
followRedirects: false,
handleAs: 'text',
headers: {
Accept: 'application/json,text/plain;q=0.9',
'Content-Length': 0
},
method: 'POST'
}
dojo/request response
status: 200
total: NaN
headers: {
server: 'nginx/1.6.2',
date: 'Tue, 21 Jun 2016 21:21:59 GMT',
'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
'cache-control': 'no-cache'
}
dojo/request data
loaded: 26
chunk:
dojo/request data
loaded: 52
chunk:
dojo/request data
loaded: 78
chunk:
dojo/request throwing
CancelError: Timeout reached on IE10 on WIN - element/disabled - skips disabled elements