Skip to content

Commit

Permalink
[iedriver] Fix closing of all tabs in Edge IE mode (#9998)
Browse files Browse the repository at this point in the history
Fix the problem that it closes all tabs when using webdriver.close() to close the current tab in Edge IE Mode.

Signed-off by: jimevans <james.h.evans.jr@gmail.com>
  • Loading branch information
yk9772 authored Nov 4, 2021
1 parent 2a31dd2 commit 63371ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cpp/iedriver/Browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,8 @@ void Browser::Close() {
// make any sense.
this->SetFocusedFrameByElement(NULL);

//HRESULT hr = S_OK;
//if (this->is_edge_chromium_) {
// hr = PostMessage(GetTopLevelWindowHandle(), WM_CLOSE, 0, 0);
//} else {
// hr = this->browser_->Quit();
//}
HRESULT hr = this->browser_->Quit();
HRESULT hr = S_OK;
hr = this->browser_->Quit();

if (FAILED(hr)) {
LOGHR(WARN, hr) << "Call to IWebBrowser2::Quit failed";
Expand Down

0 comments on commit 63371ba

Please sign in to comment.