From 63371baff865c4b390d2e7fe7c87af15b41c67b8 Mon Sep 17 00:00:00 2001 From: yk9772 <93392713+yk9772@users.noreply.github.com> Date: Fri, 5 Nov 2021 04:38:39 +0900 Subject: [PATCH] [iedriver] Fix closing of all tabs in Edge IE mode (#9998) 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 --- cpp/iedriver/Browser.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cpp/iedriver/Browser.cpp b/cpp/iedriver/Browser.cpp index f9f54691f1be6..59717e3a69ab5 100644 --- a/cpp/iedriver/Browser.cpp +++ b/cpp/iedriver/Browser.cpp @@ -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";