MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / FindChildDialogWindow

Method FindChildDialogWindow

cpp/iedriver/HtmlDialog.cpp:281–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281BOOL CALLBACK HtmlDialog::FindChildDialogWindow(HWND hwnd, LPARAM arg) {
282 DialogWindowInfo* window_info = reinterpret_cast<DialogWindowInfo*>(arg);
283 if (::GetWindow(hwnd, GW_OWNER) != window_info->hwndOwner) {
284 return TRUE;
285 }
286 std::vector<char> window_class_name(34);
287 if (::GetClassNameA(hwnd, &window_class_name[0], 34) == 0) {
288 // No match found. Skip
289 return TRUE;
290 }
291 if (strcmp(ALERT_WINDOW_CLASS, &window_class_name[0]) != 0 &&
292 strcmp(HTML_DIALOG_WINDOW_CLASS, &window_class_name[0]) != 0) {
293 return TRUE;
294 } else {
295 // If the window style has the WS_DISABLED bit set or the
296 // WS_VISIBLE bit unset, it can't be handled via the UI,
297 // and must not be a visible dialog.
298 if ((::GetWindowLong(hwnd, GWL_STYLE) & WS_DISABLED) != 0 ||
299 (::GetWindowLong(hwnd, GWL_STYLE) & WS_VISIBLE) == 0) {
300 return TRUE;
301 }
302 }
303 window_info->hwndDialog = hwnd;
304 return FALSE;
305}
306
307} // namespace webdriver

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected