Hi Everyone i am trying to accept alert using below code but i am getting timeout exception everytime. tried increasing wait time still same error
wait = WebDriverWait(driver, 60)
driver.get('abc.com')
alert = wait.until(EC.alert_is_present()) ----------Error at this line
time.sleep(4)
#WebDriverWait(driver, 3).until(EC.alert_is_present())
alert = driver.switch_to.alert
alert.send_keys('username' + Keys.TAB + 'password')
alert.accept()
Error :-
Traceback (most recent call last):
File "C:\Users\Gaurav Chhabra\Desktop\FAIL_RATE.py", line 30, in <module>
alert = wait.until(EC.alert_is_present())
File "C:\Users\Gaurav Chhabra\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
What could be the reason as have used the same code on another website and its working, is this is because of some website features which are unable etc ? i have also attached image of alert
or if somebody can help me with some new way to pass username & password in this alert ?
thanks