I have a password protected proxy whose username and password constantly change so I need to always enter them in the firefox prompt that shows when you start the browser. I can't find anyway to switch from the username input to the password input. I've been using this code to handle the alert:
try:
WebDriverWait(driver, 3).until(EC.alert_is_present(),
'Timed out waiting for PA creation ' +
'confirmation popup to appear.')
alert_input = Alert(driver)
alert_input.send_keys('username')
alert_input.send_keys(Keys.TAB)
alert_input.send_keys('password')
alert_input.accept()
print("alert accepted")
except TimeoutException:
print("no alert")
However, this doesn't work because after entering the username into the username field, it replaces it with and doesn't move to the password field. So what I'm assuming is that it literally enters the tab into the username field instead of tabbing to the password field. Is there a way to switch fields without the tab key or somehow do it with the tab key?
Thanks