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

Method ExecuteInternal

cpp/iedriver/CommandHandlers/QuitCommandHandler.cpp:30–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void QuitCommandHandler::ExecuteInternal(
31 const IECommandExecutor& executor,
32 const ParametersMap& command_parameters,
33 Response* response) {
34 IECommandExecutor& mutable_executor = const_cast<IECommandExecutor&>(executor);
35 mutable_executor.set_is_quitting(true);
36
37 std::vector<std::string> managed_browser_handles;
38 executor.GetManagedBrowserHandles(&managed_browser_handles);
39
40 std::vector<std::string>::iterator end = managed_browser_handles.end();
41 for (std::vector<std::string>::iterator it = managed_browser_handles.begin();
42 it != end;
43 ++it) {
44 BrowserHandle browser_wrapper;
45 int status_code = executor.GetManagedBrowser(*it, &browser_wrapper);
46 if (status_code == WD_SUCCESS && !browser_wrapper->is_closing()) {
47 browser_wrapper->Close();
48 }
49 }
50
51 // Calling quit will always result in an invalid session.
52 mutable_executor.set_is_valid(false);
53 response->SetSuccessResponse(Json::Value::null);
54}
55
56} // namespace webdriver

Callers

nothing calls this directly

Calls 8

set_is_quittingMethod · 0.80
endMethod · 0.80
GetManagedBrowserMethod · 0.80
is_closingMethod · 0.80
set_is_validMethod · 0.80
SetSuccessResponseMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected