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

Method GetManagedBrowser

cpp/iedriver/IECommandExecutor.cpp:1319–1342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1317}
1318
1319int IECommandExecutor::GetManagedBrowser(const std::string& browser_id,
1320 BrowserHandle* browser_wrapper) const {
1321 LOG(TRACE) << "Entering IECommandExecutor::GetManagedBrowser";
1322
1323 if (!this->is_valid()) {
1324 LOG(TRACE) << "Current command executor is not valid";
1325 return ENOSUCHDRIVER;
1326 }
1327
1328 if (browser_id == "") {
1329 LOG(WARN) << "Browser ID requested was an empty string";
1330 return ENOSUCHWINDOW;
1331 }
1332
1333 BrowserMap::const_iterator found_iterator =
1334 this->managed_browsers_.find(browser_id);
1335 if (found_iterator == this->managed_browsers_.end()) {
1336 LOG(WARN) << "Unable to find managed browser with id " << browser_id;
1337 return ENOSUCHWINDOW;
1338 }
1339
1340 *browser_wrapper = found_iterator->second;
1341 return WD_SUCCESS;
1342}
1343
1344void IECommandExecutor::GetManagedBrowserHandles(std::vector<std::string>* managed_browser_handles) const {
1345 LOG(TRACE) << "Entering IECommandExecutor::GetManagedBrowserHandles";

Callers 7

OnBrowserNewWindowMethod · 0.95
GetCurrentBrowserMethod · 0.95
ExecuteInternalMethod · 0.80
ExecuteInternalMethod · 0.80
ExecuteInternalMethod · 0.80
ExecuteInternalMethod · 0.80

Calls 4

is_validMethod · 0.95
findMethod · 0.80
endMethod · 0.80
LOGClass · 0.50

Tested by

no test coverage detected