1

enter image description here

I'm trying to set up a proxy with basic auth for chromedriver, I have a working squid proxy set up on an EC2 node. I found the following code (slightly modified)

    driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, options=options)

    driver.get("https://yahoo.com")
    wait = WebDriverWait(driver, 10)
    alert = wait.until(EC.alert_is_present())
    alert = driver.switch_to(alert)
    alert.send_keys('myname')
    alert.send_keys(Keys.TAB)
    alert.send_keys('mypass')
    alert.accept()

However The auth Box is not being filled. How can I get this working?

Edit, this is not a duplicate question. I am using chrome 64, and chromedriver. not firefox. I'm also using a proxy (not in the other question) I tried the accepted answer which did not work. Apparently anything above chrome 59 will not allow this method (Chrome 59 and Basic Authentication with Selenium/Fluentlenium) .

user1592380
  • 34,265
  • 92
  • 284
  • 515

1 Answers1

0

The simplest solution is building the url as:

http://username:password@url
MPA95
  • 175
  • 2
  • 11