This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,23 @@ export interface Config {
9292 */
9393 sauceKey ?: string ;
9494 /**
95- * Use sauceAgent if you need customize agent for https connection to
96- * saucelabs.com (i.e. your computer behind corporate proxy)
95+ * Use sauceAgent if you need custom HTTP agent to connect to saucelabs.com.
96+ * This is needed if your computer is behind a corporate proxy.
97+ *
98+ * To match sauce agent implementation, use
99+ * [HttpProxyAgent](https://github.com/TooTallNate/node-http-proxy-agent)
100+ * to generate the agent or use sauceProxy as an alternative. If a
101+ * sauceProxy is provided, the sauceAgent will be overridden.
102+ */
103+ sauceAgent ?: HttpProxyAgent ;
104+ /**
105+ * Use sauceProxy if you are behind a corporate proxy to connect to
106+ * saucelabs.com.
107+ *
108+ * The sauceProxy is used to generate an HTTP agent. If a sauceProxy is
109+ * provided, the sauceAgent will be overridden.
97110 */
98- sauceAgent ?: string ;
111+ sauceProxy ?: string ;
99112 /**
100113 * Use sauceBuild if you want to group test capabilites by a build ID
101114 */
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ export class Sauce extends DriverProvider {
5757 this . sauceServer_ = new SauceLabs ( {
5858 username : this . config_ . sauceUser ,
5959 password : this . config_ . sauceKey ,
60- agent : this . config_ . sauceAgent
60+ agent : this . config_ . sauceAgent ,
61+ proxy : this . config_ . sauceProxy
6162 } ) ;
6263 this . config_ . capabilities [ 'username' ] = this . config_ . sauceUser ;
6364 this . config_ . capabilities [ 'accessKey' ] = this . config_ . sauceKey ;
Original file line number Diff line number Diff line change @@ -105,3 +105,7 @@ declare namespace webdriver {
105105 isPresent ?: Function ;
106106 }
107107}
108+
109+ declare interface HttpProxyAgent {
110+ constructor ( opts : Object ) : HttpProxyAgent ;
111+ }
You can’t perform that action at this time.
0 commit comments