I am using:
I need to verify the username and password for my current project. I've been working day and night for days and I can't solve this problem. I've found a few extension on the internet, but it's from '13 year and I guess that's why it doesn't work. You can also see other methods I've tried below.
But doesn't work, because Proxy Authentication is not working anymore due to the Selenium bug..
alert_popup = browser.switch_to_alert()
alert_popup.send_keys(
"{username}{tab}{password}{tab}".format(
username=proxy_username, tab=Keys.TAB, password=proxy_password
)
)
alert_popup.accept()
I wanted to create a profile and save the proxy information manually and start selenium with that profile. However, firefox does not allow user name and password to be entered manually.
To use proxies with auth in python selenium you can use seleniumwire.
Fistly, install it with pip install selenium-wire
Then import webdriver from seleniumwire instead selenium
Check the original Answer here
from seleniumwire import webdriver
options = {
'proxy': {
'http': 'http://username:password@host:port',
'https': 'https://username:password@host:port',
'no_proxy': 'localhost,127.0.0.1' # excludes
}
}
browser = webdriver.Chrome(path_to_driver, seleniumwire_options=options)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With