File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
javascript/node/selenium-webdriver Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 77* Added support for Safari 10 safaridriver. safaridriver may be disabled
88 via tha API, ` safari.Options#useLegacyDriver ` , to use the safari
99 extension driver.
10+ * Updated the ` lib/proxy ` module to support configuring a SOCKS proxy.
1011
1112### API Changes
1213
Original file line number Diff line number Diff line change @@ -76,6 +76,34 @@ exports.manual = function(options) {
7676} ;
7777
7878
79+ /**
80+ * Creates a proxy configuration for a socks proxy.
81+ *
82+ * __Example:__
83+ *
84+ * const {Capabilities} = require('selenium-webdriver');
85+ * const proxy = require('selenium-webdriver/lib/proxy');
86+ *
87+ * let capabilities = new Capabilities();
88+ * capabilities.setProxy(proxy.socks('localhost:1234', 'bob', 'password'));
89+ *
90+ *
91+ * @param {string } host The proxy host, in the form `hostname:port`.
92+ * @param {string } username The user name to authenticate as.
93+ * @param {string } password The password to authenticate with.
94+ * @return {!ProxyConfig } A new proxy configuration object.
95+ * @see https://en.wikipedia.org/wiki/SOCKS
96+ */
97+ exports . socks = function ( host , username , password ) {
98+ return /** @type {!ProxyConfig } */ ( {
99+ proxyType : 'manual' ,
100+ socksProxy : host ,
101+ socksUsername : username ,
102+ socksPassword : password
103+ } ) ;
104+ } ;
105+
106+
79107/**
80108 * Configures WebDriver to configure the browser proxy using the PAC file at
81109 * the given URL.
You can’t perform that action at this time.
0 commit comments