-->

Selenium - random “Command line server for the IE

2019-06-08 08:07发布

问题:

I have several hundred selenium tests for my company's e-commerce site. In particular, about half of them is checkout testing with small variances (singleship with visa, multiship with amex, etc). I mention this because all of these tests use almost the exact same code, just with slight differences.

These tests are kicked off from Jenkins using Selenium Grid as a hub and being deployed to a Windows Server 2012 VM running Chrome and IE tests simultaneously. After kicking off my tests, without fail after several hours I will get a browser popup saying Command line server for the IE Driver has stopped working and a button to Close the program. This causes test execution to hang.

I have tried to upgrade to the latest version of the grid on the VM, and the latest version of the IE Driver Server. I have also written a little rest server that runs Runtime.getRuntime().exec("taskkill /F /IM IEDriverServer.exe") at the beginning of each test (I thought that perhaps too many windows open at one time caused the error, but even with this fix it didn't help). I also tried adding TabProcGrowth to HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main to the registry, but that just caused multiple windows to open at the beginning of each test, breaking things further.

Additionally, I have implemented a retry analyzer that will retry failed tests. After manually clicking Close the program, the test will restart and almost always pass. Considering that, and the nature of the checkout tests, I don't think the issue is a code problem.

I have tried for days to solve this. Any help would be greatly appreciated!