I am trying to connect to a website using Selenium in Python. The script works perfectly when I don't use any proxy. However, when I try to re-run the script again with Proxy then I get ERR_TUNNEL_CONNECTION_FAILED and the page isn't displayed. Below is the code:
from selenium import webdriver
webdriver.DesiredCapabilities.CHROME['proxy']={
"httpProxy":PROXY,
"ftpProxy":PROXY,
"sslProxy":PROXY,
"proxyType":"MANUAL",
}
browser = webdriver.Chrome(executable_path='../chromedriver.exe')
browser.get('https://www.facebook.com')
Is there a solution to get past this error code? The only thing new that is added is the webdriver.DesiredCapabilities.CHROME where PROXY is added. If I don't use this then the script works just fine. I am unable to understand what I may be doing wrong here.