How to set https proxy for selenium webdriver?

I am trying to use protractor to automatically test javascript. This means the following instructions: http://www.ng-newsletter.com/posts/practical-protractor.html

npm install -g protractor 

completes the penalty. But:

 webdriver-manager update 

Do not bypass the proxy server that I have at work. Apparently, now you can install the proxy server in the configuration, but I can not follow how to do this: https://github.com/angular/protractor/pull/966 Basically, I need to install "env. HTTPS_PROXY "but I don’t see where to do it? I see that I could probably modify the webdriver-manager file to fix this, but that seems wrong.

Note. I tried to install these files (from the webdriver-manager update) manually and copy them to the expected locations, but the jar file will be corrupted.

+7
proxy selenium selenium-webdriver webdriver protractor
source share
2 answers

I just found that it is now configured to support --proxy="<proxy>" as an argument, so the problem has been resolved.

I also needed to use --ignore_ssl for this

+13
source

In cmd

 set PROXY=http://username: password@proxyserver :port set HTTP_PROXY=%PROXY% set HTTPS_PROXY=%PROXY% webdriver-manager update 

Or go to the .npmrc file, as a rule, here: C: \ Users \ username.npmrc (if you do not search for it using the npm config ls -l | grep config ) and set the proxy variables manually by entering it

 proxy=http://username: password@proxyserver :port https-proxy=http://username: password@proxyserver :port 

The third way is to make two system environment variables HTTP_PROXY and HTTPS_PROXY with the value http://username: password@proxyserver :port

+12
source

All Articles