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

Method GetProxyAsJson

cpp/iedriver/ProxyManager.cpp:123–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123Json::Value ProxyManager::GetProxyAsJson() {
124 LOG(TRACE) << "ProxyManager::GetProxyAsJson";
125 Json::Value proxy_value;
126 proxy_value["proxyType"] = this->proxy_type_;
127 if (this->proxy_type_ == WD_PROXY_TYPE_MANUAL) {
128 if (this->http_proxy_.size() > 0) {
129 proxy_value["httpProxy"] = this->http_proxy_;
130 }
131 if (this->ftp_proxy_.size() > 0) {
132 proxy_value["ftpProxy"] = this->ftp_proxy_;
133 }
134 if (this->ssl_proxy_.size() > 0) {
135 proxy_value["sslProxy"] = this->ssl_proxy_;
136 }
137 if (this->socks_proxy_.size() > 0) {
138 proxy_value["socksProxy"] = this->socks_proxy_;
139 if (this->socks_user_name_.size() > 0) {
140 proxy_value["socksUsername"] = this->socks_user_name_;
141 }
142 if (this->socks_password_.size() > 0) {
143 proxy_value["socksPassword"] = this->socks_password_;
144 }
145 }
146 } else if (this->proxy_type_ == WD_PROXY_TYPE_AUTOCONFIGURE) {
147 proxy_value["proxyAutoconfigUrl"] = this->proxy_autoconfigure_url_;
148 }
149 return proxy_value;
150}
151
152std::wstring ProxyManager::BuildProxySettingsString() {
153 LOG(TRACE) << "ProxyManager::BuildProxySettingsString";

Callers 2

ExecuteInternalMethod · 0.80

Calls 2

LOGClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected