You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the browser crashes or the window is closed the keyword 'Handle Alert' is waiting for an alert to appear, the error "Alert not found in (time)" is raised, where (time) is the timeout configured, but not reached. For example, if timeout is 2 minutes the error shows as Alert not found in 2 minutes. despite the keyword failing after only a few seconds.
Alert not found in 2 minutes.
Traceback (most recent call last):
File "C:\Users\Zeckie\AppData\Local\Programs\Python\Python37\Lib\site-packages\SeleniumLibrary\__init__.py", line 467, in run_keyword
return DynamicCore.run_keyword(self, name, args, kwargs)
File "C:\Users\Zeckie\AppData\Local\Programs\Python\Python37\Lib\site-packages\SeleniumLibrary\base\robotlibcore.py", line 102, in run_keyword
return self.keywords[name](*args, **kwargs)
File "C:\Users\Zeckie\AppData\Local\Programs\Python\Python37\Lib\site-packages\SeleniumLibrary\keywords\alert.py", line 117, in handle_alert
alert = self._wait_alert(timeout)
File "C:\Users\Zeckie\AppData\Local\Programs\Python\Python37\Lib\site-packages\SeleniumLibrary\keywords\alert.py", line 138, in _wait_alert
% secs_to_timestr(timeout))
Expected behavior and actual behavior
I expect the test to fail, but for the error message to not be misleading. Ie. it should say that the window was closed (or that it couldn't communicate with the browser).
I think I understand what you are saying, but I need to also see the results from your examples. I will try to find time to do it, when I have reviewed #1497
Steps to reproduce the issue
If the browser crashes or the window is closed the keyword 'Handle Alert' is waiting for an alert to appear, the error "Alert not found in (time)" is raised, where (time) is the timeout configured, but not reached. For example, if timeout is 2 minutes the error shows as
Alert not found in 2 minutes.
despite the keyword failing after only a few seconds.I've created a demo at: https://github.com/Zeckie/AlertBug/tree/master/RobotProject
Error messages and additional information
From test DelayedClose (source https://github.com/Zeckie/AlertBug/blob/master/RobotProject/Alerts.robot)
Expected behavior and actual behavior
I expect the test to fail, but for the error message to not be misleading. Ie. it should say that the window was closed (or that it couldn't communicate with the browser).
Environment
Browser: Chrome 78
Browser driver: chromedriver 77
Operating System: Windows 10
Eclipse: 2019-09
Libraries
I'm working on a fix - will submit a pull request soon.
The text was updated successfully, but these errors were encountered: