forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing IE driver crash when clicking on link that opens a new window.
When IWebBrowser2::Quit() is called, the wrapper process doesn't exit right away. When that happens, CoCreateInstance can fail while the abandoned iexplore.exe instance is still valid. The "right" way to do this would be to call ::EnumProcesses before calling CoCreateInstance, finding all of the iexplore.exe processes, waiting for one to exit, and then proceed. However, there is no way to tell if a process ID belongs to an Internet Explorer instance, particularly when a 32-bit process tries to enumerate 64-bit processes on 64-bit Windows. So, we take the brute force way out, just retrying the call to CoCreateInstance until it succeeds (the old iexplore.exe process has exited), or we get a different error code. We also set a 45-second timeout, with 45 seconds being chosen because it's below the default 60 second HTTP request timeout of most language bindings. Fixes issue SeleniumHQ#5848. Fixes issue SeleniumHQ#7021.
- Loading branch information
Showing
9 changed files
with
264 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.