Skip to content

Commit

Permalink
Correcting logic error in IE driver alert handling.
Browse files Browse the repository at this point in the history
A slight logic error in the alert handling code was causing the alert
handling to not wait for the alert to be completely dismissed before
continuing. This was causing a race condition that could lead to crashes
when quitting the browser if certain types of alerts were active. Fixes
issue SeleniumHQ#5489.
  • Loading branch information
jimevans committed Apr 17, 2013
1 parent 2b6b0d1 commit a6861f9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/IEDriver/Alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int Alert::ClickAlertButton(DialogButtonInfo button_info) {
// algorithim, since the busy property of the browser may
// not be the right thing to check here.
int retry_count = 20;
while (::IsWindow(this->alert_handle_) && this->browser_->IsBusy() && retry_count > 0) {
while ((::IsWindow(this->alert_handle_) || this->browser_->IsBusy()) && retry_count > 0) {
::Sleep(50);
retry_count--;
}
Expand Down
8 changes: 8 additions & 0 deletions cpp/IEDriverServer/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ available via the project downloads page. Changes in "revision" field indicate
private releases checked into the prebuilts directory of the source tree, but
not made generally available on the downloads page.

v2.32.3.1
=========
* Corrected logic error in alert handling. A slight logic error in the alert
handling code was causing the alert handling to not wait for the alert to be
completely dismissed before continuing. This was causing a race condition
that could lead to crashes when quitting the browser if certain types of
alerts were active. Fixes issue #5489.

v2.32.3.0
=========
* Corrected number of script arguments in InputManager::SendKeystrokes. In a
Expand Down
Binary file modified cpp/IEDriverServer/IEDriverServer.rc
Binary file not shown.
Binary file modified cpp/prebuilt/Win32/Release/IEDriverServer.exe
Binary file not shown.
Binary file modified cpp/prebuilt/x64/Release/IEDriverServer.exe
Binary file not shown.

0 comments on commit a6861f9

Please sign in to comment.