from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.proxy import *
myProxy = "user:pass@proxy:port"
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': myProxy,
'ftpProxy': myProxy,
'sslProxy': myProxy,
'noProxy': '' # set this value as desired
})
driver = webdriver.Firefox(proxy=proxy)
driver.set_window_size(1024, 768)
driver.get('http://whois.urih.com/')
When directed to that website it still shows my local proxy. I got the above from the selenium site but it has not availed me.
EDIT: I just tried changing the format to proxy:port:user:pass
and this time the proxy seems engaged since now the dialog box opened to input username and pass. Well this is no good either. Surely I don't need to try the roundabout way of focusing the alert and inputting the info there...