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

Method ExecuteInternal

cpp/iedriver/CommandHandlers/ActionsCommandHandler.cpp:33–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void ActionsCommandHandler::ExecuteInternal(
34 const IECommandExecutor& executor,
35 const ParametersMap& command_parameters,
36 Response* response) {
37 BrowserHandle browser_wrapper;
38 int status_code = executor.GetCurrentBrowser(&browser_wrapper);
39 if (status_code != WD_SUCCESS) {
40 response->SetErrorResponse(status_code, "Unable to get current browser");
41 return;
42 }
43 ParametersMap::const_iterator actions_parameter_iterator = command_parameters.find("actions");
44 if (actions_parameter_iterator == command_parameters.end()) {
45 response->SetErrorResponse(ERROR_INVALID_ARGUMENT, "Missing parameter: actions");
46 return;
47 }
48 if (!actions_parameter_iterator->second.isArray()) {
49 response->SetErrorResponse(ERROR_INVALID_ARGUMENT, "Actions value is not an array");
50 return;
51 }
52 std::string error_info = "";
53 status_code = executor.input_manager()->PerformInputSequence(browser_wrapper,
54 actions_parameter_iterator->second,
55 &error_info);
56 if (status_code != WD_SUCCESS) {
57 if (status_code == EMOVETARGETOUTOFBOUNDS) {
58 response->SetErrorResponse(status_code, error_info);
59 } else {
60 response->SetErrorResponse(status_code, "Unexpected error performing action sequence.");
61 }
62 return;
63 }
64 response->SetSuccessResponse(Json::Value::null);
65}
66
67} // namespace webdriver

Callers

nothing calls this directly

Calls 7

GetCurrentBrowserMethod · 0.80
SetErrorResponseMethod · 0.80
findMethod · 0.80
endMethod · 0.80
PerformInputSequenceMethod · 0.80
input_managerMethod · 0.80
SetSuccessResponseMethod · 0.80

Tested by

no test coverage detected