Skip to content

Commit fffd750

Browse files
yk9772elgatov
authored andcommitted
[iedriver] Fix closing of all tabs in Edge IE mode (SeleniumHQ#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 <james.h.evans.jr@gmail.com>
1 parent e5b05b6 commit fffd750

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cpp/iedriver/Browser.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,8 @@ void Browser::Close() {
432432
// make any sense.
433433
this->SetFocusedFrameByElement(NULL);
434434

435-
//HRESULT hr = S_OK;
436-
//if (this->is_edge_chromium_) {
437-
// hr = PostMessage(GetTopLevelWindowHandle(), WM_CLOSE, 0, 0);
438-
//} else {
439-
// hr = this->browser_->Quit();
440-
//}
441-
HRESULT hr = this->browser_->Quit();
435+
HRESULT hr = S_OK;
436+
hr = this->browser_->Quit();
442437

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

0 commit comments

Comments
 (0)