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

Function StartServer

cpp/iedriver/WebDriver.cpp:23–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "StringUtilities.h"
22
23webdriver::Server* StartServer(int port,
24 const std::wstring& host,
25 const std::wstring& log_level,
26 const std::wstring& log_file,
27 const std::wstring& version,
28 const std::wstring& whitelist) {
29 LOG(TRACE) << "Entering StartServer";
30 if (server == NULL) {
31 LOG(DEBUG) << "Instantiating webdriver server";
32
33 std::string converted_host = webdriver::StringUtilities::ToString(host);
34 std::string converted_log_level = webdriver::StringUtilities::ToString(log_level);
35 std::string converted_log_file = webdriver::StringUtilities::ToString(log_file);
36 std::string converted_version = webdriver::StringUtilities::ToString(version);
37 std::string converted_acl = webdriver::StringUtilities::ToString(whitelist);
38 server = new webdriver::IEServer(port,
39 converted_host,
40 converted_log_level,
41 converted_log_file,
42 converted_version,
43 converted_acl);
44 if (!server->Start()) {
45 LOG(TRACE) << "Starting of IEServer is failed";
46 delete server;
47 server = NULL;
48 }
49 }
50 return server;
51}
52
53void StopServer() {
54 LOG(TRACE) << "Entering StopServer";

Callers

nothing calls this directly

Calls 2

LOGClass · 0.50
StartMethod · 0.45

Tested by

no test coverage detected