I'm trying to automate my login process to my home router and I want to enter the username and the password into an alert message, unfortunately, I can't do it
after doing some research I found that I can accept the alert using
alert = driver.switch_to.alert alert.accept()
and sending keys into the web
using method called send_keys()
but the problem that i have two textboxes instead of one
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("192.168.1.1")
#note i have both textboxes in the same alert
#and the alert popup once I request the page
alert = driver.switch_to.alert
alert.send_keys('admin')
alert.send_keys('admin')
alert.accept()