It is a Selenium bug The problem is in incorrect proxy processing. Default Ubuntu exclusions are located in a no_proxy environment variable: no_proxy=localhost,127.0.0.0/8
But /8 mask doesn't work for selenium. In order to solve this problem we need to change no_proxy as follows:
no_proxy=localhost,127.0.0.1
You can also remove proxy settings before executing the python script:
http_proxy=python script.py
If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s advanced Selenium training!