| 1317 | } |
| 1318 | |
| 1319 | int 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 | |
| 1344 | void IECommandExecutor::GetManagedBrowserHandles(std::vector<std::string>* managed_browser_handles) const { |
| 1345 | LOG(TRACE) << "Entering IECommandExecutor::GetManagedBrowserHandles"; |
no test coverage detected