This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 3 files changed +22
-4
lines changed
3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,23 @@ export interface Config {
92
92
*/
93
93
sauceKey ?: string ;
94
94
/**
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.
97
110
*/
98
- sauceAgent ?: string ;
111
+ sauceProxy ?: string ;
99
112
/**
100
113
* Use sauceBuild if you want to group test capabilites by a build ID
101
114
*/
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ export class Sauce extends DriverProvider {
57
57
this . sauceServer_ = new SauceLabs ( {
58
58
username : this . config_ . sauceUser ,
59
59
password : this . config_ . sauceKey ,
60
- agent : this . config_ . sauceAgent
60
+ agent : this . config_ . sauceAgent ,
61
+ proxy : this . config_ . sauceProxy
61
62
} ) ;
62
63
this . config_ . capabilities [ 'username' ] = this . config_ . sauceUser ;
63
64
this . config_ . capabilities [ 'accessKey' ] = this . config_ . sauceKey ;
Original file line number Diff line number Diff line change @@ -105,3 +105,7 @@ declare namespace webdriver {
105
105
isPresent ?: Function ;
106
106
}
107
107
}
108
+
109
+ declare interface HttpProxyAgent {
110
+ constructor ( opts : Object ) : HttpProxyAgent ;
111
+ }
You can’t perform that action at this time.
0 commit comments