Reputation: 11
I have a simple protractor test which runs fine on sauce labs when am out of my corporate network. But, the same fails when I run the script inside my corporate office behind the firewall.
I tried to give the proxy settings in my protractor config file which is not working. Any help would be greatly appreciated.
Upvotes: 1
Views: 269
Reputation: 186
There is a mechanism built in to Protractor for passing proxy information to Sauce labs called sauceAgent. Here is a code snippet from a protractor config file.
var HttpsProxyAgent = require("https-proxy-agent");
var agent = new HttpsProxyAgent('http://localhost:56193'); //Insert your proxy info here
exports.config = {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
sauceAgent: agent,
Also, don't forget to add "https-proxy-agent" to your package.json file.
Upvotes: 0