Python Selenium 4.0.0 - Does not respect no_proxy variable but respects http_proxy and https_proxy
See original GitHub issue🐛 Bug Report
I upgraded python selenium 4.0.0 and when the tests run the request to the webdriver on localhost is sent to the proxy specified in environment variable https_proxy. The no_proxy variable is pecified to exclude localhost
.
To Reproduce
- Define proxy environment variables in your shell
Run selenium tests inside the shell. Requests to the webdriver on localhost is sent to the proxy even though no_proxy is defined.
When the reqeuest to localhost went to the proxy it was caught in the proxy protection solution and returned an erorr page that localhost is not categorized. :
<b>Blocked Category</b>: none<br>
<b>Internet Address</b>: http://localhost/session <br>
The request shouldn’t have been sent to the proxy in the first place.
Expected behavior
Both the values in http(s)_proxy and no_proxy should be respected.
This works in python selenium 3.141.0
Test script or set of commands reproducing this issue
Define environment variables in the shell:
export https_proxy=http:\\server:port
export http_proxy=http:\\server:port
export no_proxy=localhost
Run your selenium test:
python my_test.py
Environment
OS: Windows 10 Browser: Chrome Browser version: 94.0.4606.71 Browser Driver version: ChromeDriver 94.0.4606.61 Language Bindings version: python selenium 4.0.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
cool, thanks, I have added these to test cases and things still look good.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.