Im using WebdriverIO together with the IEDriver 3.150.1.0, somehow the driver does not receive the correct parameters, although WDIO sends it out in the right way. All required configurations are set.
I created this issue https://github.com/webdriverio/webdriverio/issues/5576 over at WebdriverIO, I got the information that WDIO passes the correct parameters to the driver... I assume that somewhere in the driver or in between the parameters are not handled properly. When using IEDriver versions 3.4 - 3.9 this misbehavior was not present, the driver received the parameters (Although I encountered different errors with these versions.).
`const { remote } = require("webdriverio");
let browsers = []
callTests(new Array(10)).then(erg => {
console.log("Done")
})
async function main(nsc, i) {
//console.log(Started test: ${testcase}@${nsc} (${i+1}/${allNSC.length}))
const browser = await remote({
capabilities : {
browserName: "internet explorer",
},
port:4448,
logLevel: "error",
outputDir: __dirname + "../../../logs/"
}).catch(err => console.log(err));
browsers[i] = browser
global.browser = browser;
let url = "https://www.nytimes.com/"
await browser.url(url)
await browser.deleteSession()
await delete browser
await delete browsers[i]
}
function callTests(arr, i) {
return new Promise(res => {
if (i == undefined) i = 0
let error = false
main(arr[i], i).catch(async e => {
console.error(e, arr[i])
error = e
await browsers[i].deleteSession();
await delete browsers[i]
}).then(async erg => {
if (i < arr.length - 1) return res(callTests(arr, ++i))
else res()
});
})
}`
Detailed steps to reproduce the behavior:
.\IEDriverServer.exe --port=4448 --log-level=DEBUGnpm install webdriverio The IEDriver receives the outgoing parameters.
OS: Windows 10
Browser: Internet Explorer
Browser version: 11.836.18362.0
Browser Driver version: IEDriver 3.150.1.0
Language Bindings version: NodeJS 13.10.1
It has nothing to IEDriverServer parameters, webdriver.io just sends an invalid new session request:
D 2020-07-06 16:59:55:266 C:\Projects\webdriver\cpp\webdriver-server\command.cc(36) Raw JSON command: { "name" : "newSession", "locator" : { }, "parameters" : }
Acording to the WDIO logs parameters were send:
2020-07-07T09:31:37.507Z INFO webdriverio: Initiate new session using the webdriver protocol
2020-07-07T09:31:37.522Z INFO webdriver: [POST] http://localhost:4448/session
2020-07-07T09:31:37.523Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: { browserName: 'internet explorer' },
firstMatch: [ {} ]
},
desiredCapabilities: { browserName: 'internet explorer' }
}
To ensure that webdriver.io sends valid payload you can use software like Wireshark to sniff the network. As soon as the "official" Selenium clients work well with IEDriverServer we tend to think that this is a webdriver.io issue.
Hello, thanks for your response! I used Wireshark to track the traffic between WDIO and the IEDriverServer.
I performed an export of the communication:
WDIO -> IEDriverServer: wireSend.txt
IEDriverServer -> WDIO: WireResp.txt
Can you tell me if there is something wrong in the way WDIO communicates with the server?
Thank you very very much! Best regards
@barancev Hey, as far as I can see from the Wireshark WDIO has send a correct session request, it transmitted the following data:
JavaScript Object Notation: application/json
Object
Member Key: capabilities
Object
Member Key: alwaysMatch
Object
Member Key: browserName
String value: internet explorer
Key: browserName
Key: alwaysMatch
Member Key: firstMatch
Array
Object
Key: firstMatch
Key: capabilities
Member Key: desiredCapabilities
Object
Member Key: browserName
String value: internet explorer
Key: browserName
Key: desiredCapabilities
Can you reopen this issue please? it seems to be a problem in this build.
@Westsaid I believe this may have been fixed in 2dfe468. To test this, you can get version 3.150.1.1 from the Selenium source tree in the cpp/prebuilt directory, and try that. Do note that at this time, that is the only way one can get this fix, aside from building from source. If that does not resolve the issue, please let me know.
@jimevans Hey, woow thanks its starting now!
But my tests often fail in "GotError: socket hang up" errors when running tests now. Do you have a clue where this problem might come from? Could this be related to using 32bit browser and driver on 64bit OS?
@Westsaid I don鈥檛 have any idea where that is coming from. I can almost guarantee it鈥檚 not because of using a 32-bit driver though.
@jimevans Hey, thanks for your response!
I made some research and found out that this might be related to the size of the website and the complexity of the test, maybe the RAM the driver can use reaches its limits...
We do a lot of visual regression with wdio, the socket often hangs up after taking a couple of fullpage screenshots. I also tried to run a complex test where we visit around 80 subpages without taking any screenshots, after around 50 pages the socket also hang up...
Do you have a clue? If you think it makes sense I would gather IE logs, make reproducible examples and file a proper issue so we can analyze it further.
Thank you so much for your support and your time @jimevans, we owe you!!! Wish you the best!