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

Method GetStatus

cpp/iedriver/IEServer.cpp:50–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50std::string IEServer::GetStatus() {
51 LOG(TRACE) << "Entering IEServer::GetStatus";
52 SYSTEM_INFO system_info;
53 ::ZeroMemory(&system_info, sizeof(SYSTEM_INFO));
54 ::GetNativeSystemInfo(&system_info);
55
56 std::string os_version = FileUtilities::GetFileVersion("kernel32.dll");
57
58 std::string arch = "x86";
59 if (system_info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
60 arch = "x64";
61 }
62
63 Json::Value build;
64 build["version"] = this->version_;
65
66 Json::Value os;
67 os["arch"] = arch;
68 os["name"] = "windows";
69 os["version"] = os_version;
70
71 bool is_ready = this->session_count() < 1;
72 std::string message = "Ready to create session";
73 if (!is_ready) {
74 message = "Maximum number of sessions already created";
75 }
76
77 Json::Value status;
78 status["build"] = build;
79 status["os"] = os;
80 status["ready"] = is_ready;
81 status["message"] = message;
82 Response response;
83 response.SetSuccessResponse(status);
84 return response.Serialize();
85}
86
87void IEServer::ShutDown() {
88 LOG(TRACE) << "Entering IEServer::ShutDown";

Callers 1

DispatchCommandMethod · 0.80

Calls 4

session_countMethod · 0.80
SetSuccessResponseMethod · 0.80
LOGClass · 0.50
SerializeMethod · 0.45

Tested by

no test coverage detected