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

Method FindTextLabel

cpp/iedriver/Alert.cpp:620–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620BOOL CALLBACK Alert::FindTextLabel(HWND hwnd, LPARAM arg) {
621 TextLabelFindInfo* find_info = reinterpret_cast<TextLabelFindInfo*>(arg);
622 std::vector<wchar_t> child_window_class(100);
623 ::GetClassName(hwnd, &child_window_class[0], 100);
624
625 if (wcscmp(&child_window_class[0], L"Static") != 0) {
626 return TRUE;
627 }
628
629 int control_id = ::GetDlgCtrlID(hwnd);
630 int text_length = ::GetWindowTextLength(hwnd);
631 if (text_length > 0) {
632 if (find_info->excluded_control_id == 0 ||
633 control_id != find_info->excluded_control_id) {
634 find_info->label_handle = hwnd;
635 find_info->control_id_found = control_id;
636 return FALSE;
637 }
638 }
639 return TRUE;
640}
641
642BOOL CALLBACK Alert::FindDirectUIChild(HWND hwnd, LPARAM arg){
643 HWND *dialog_handle = reinterpret_cast<HWND*>(arg);

Callers

nothing calls this directly

Calls 1

GetClassNameClass · 0.85

Tested by

no test coverage detected