Skip to content

Commit 44af88b

Browse files
committed
[iedriver] Fix Problem with handling other window when running in parallel
1 parent 5561cda commit 44af88b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cpp/iedriver/BrowserFactory.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,13 @@ BOOL CALLBACK BrowserFactory::FindEdgeWindow(HWND hwnd, LPARAM arg) {
10871087
// continue if it is not "Chrome_WidgetWin_1"
10881088
if (strcmp(ANDIE_FRAME_WINDOW_CLASS, name) != 0) return TRUE;
10891089

1090+
DWORD process_id = NULL;
1091+
::GetWindowThreadProcessId(hwnd, &process_id);
1092+
ProcessWindowInfo* process_window_info = reinterpret_cast<ProcessWindowInfo*>(arg);
1093+
if (process_window_info->dwProcessId != process_id) {
1094+
return TRUE;
1095+
}
1096+
10901097
return EnumChildWindows(hwnd, FindEdgeChildWindowForProcess, arg);
10911098
}
10921099

0 commit comments

Comments
 (0)