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

Method GetTitle

cpp/iedriver/HtmlDialog.cpp:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174std::string HtmlDialog::GetTitle() {
175 LOG(TRACE) << "Entering HtmlDialog::GetTitle";
176 CComPtr<IHTMLDocument2> doc;
177 this->GetDocument(&doc);
178 CComBSTR title;
179 HRESULT hr = doc->get_title(&title);
180 if (FAILED(hr)) {
181 LOGHR(WARN, hr) << "Unable to get document title";
182 return "";
183 }
184
185 std::wstring converted_title = title;
186 std::string title_string = StringUtilities::ToString(converted_title);
187 return title_string;
188}
189
190HWND HtmlDialog::GetTopLevelWindowHandle(void) {
191 LOG(TRACE) << "Entering HtmlDialog::GetTopLevelWindowHandle";

Callers

nothing calls this directly

Calls 2

GetDocumentMethod · 0.95
LOGClass · 0.50

Tested by

no test coverage detected