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

Method GetWindowCaption

cpp/iedriver/WindowUtilities.cpp:67–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::string WindowUtilities::GetWindowCaption(HWND window_handle) {
68 std::wstring window_caption = L"";
69 std::vector<wchar_t> buffer(256);
70 int success = ::GetWindowText(window_handle, &buffer[0], 256);
71 if (success > 0) {
72 window_caption = &buffer[0];
73 }
74 return StringUtilities::ToString(window_caption);
75}
76
77std::string WindowUtilities::GetWindowClass(HWND window_handle) {
78 std::string window_class = "";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected