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

Method GetActiveDialogWindowHandle

cpp/iedriver/Browser.cpp:867–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865}
866
867HWND Browser::GetActiveDialogWindowHandle() {
868 LOG(TRACE) << "Entering Browser::GetActiveDialogWindowHandle";
869
870 HWND active_dialog_handle = NULL;
871
872 HWND content_window_handle = this->GetContentWindowHandle();
873 if (content_window_handle == NULL) {
874 return active_dialog_handle;
875 }
876
877 DWORD process_id = 0;
878 ::GetWindowThreadProcessId(content_window_handle, &process_id);
879 if (process_id == 0) {
880 return active_dialog_handle;
881 }
882
883 ProcessWindowInfo process_win_info;
884 process_win_info.dwProcessId = process_id;
885 process_win_info.hwndBrowser = NULL;
886 ::EnumWindows(&BrowserFactory::FindDialogWindowForProcess,
887 reinterpret_cast<LPARAM>(&process_win_info));
888 if (process_win_info.hwndBrowser != NULL) {
889 active_dialog_handle = process_win_info.hwndBrowser;
890 this->CheckDialogType(active_dialog_handle);
891 }
892
893 return active_dialog_handle;
894}
895
896void Browser::CheckDialogType(HWND dialog_window_handle) {
897 LOG(TRACE) << "Entering Browser::CheckDialogType";

Callers 9

WaitMethod · 0.95
IsAlertActiveMethod · 0.45
ExecuteInternalMethod · 0.45
ExecuteInternalMethod · 0.45
ExecuteInternalMethod · 0.45
ExecuteInternalMethod · 0.45
ExecuteInternalMethod · 0.45

Calls 3

CheckDialogTypeMethod · 0.95
LOGClass · 0.50

Tested by

no test coverage detected