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
There are three tests in tests/test_other_pages.py which test the functionality of interacting with Alert elements (JS alerts, prompts, confirms) which are failing in TravisCI. They are test_javascript_alert, test_javascript_confirm, and test_javascript_prompt.
These tests pass locally, but something about TravisCI does not like what's happening. Please note, element functionality was recently refactored, however this functionality wasn't touched. Travis is throwing the following exception:
ERROR: test_javascript_alert (test_other_pages.TestOtherPages)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/erik-whiting/LuluTest/tests/test_other_pages.py", line 108, in test_javascript_alert
bp.close()
File "/home/travis/build/erik-whiting/LuluTest/page/page.py", line 23, in close
self.page.close()
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 688, in close
self.execute(Command.CLOSE)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 241, in check_response
raise exception_class(message, screen, stacktrace, alert_text)
**selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: I am a JS Alert
Message: unexpected alert open: {Alert text : I am a JS Alert}
(Session info: headless chrome=77.0.3865.120)**
----------------------------------------------------------------------
It is not just Travis some update broke these tests. I just checkout to an old commit #39 and it works in my local computer, but with the up-to-date development branch, I get the "UnexpectedAlertPresentException" in my local computer, even if I add some big manual wait like time.sleep(5), and I can visually confirm that the alert appears by removing the "headless" option.
There are three tests in
tests/test_other_pages.py
which test the functionality of interacting with Alert elements (JS alerts, prompts, confirms) which are failing in TravisCI. They aretest_javascript_alert
,test_javascript_confirm
, andtest_javascript_prompt
.These tests pass locally, but something about TravisCI does not like what's happening. Please note, element functionality was recently refactored, however this functionality wasn't touched. Travis is throwing the following exception:
My guess is that there is a timing issue where the test case is not waiting long enough for the alert boxes to show up. I found a promising looking StackOverflow issue that we may be able to implement to get it working again:
[Check if any alert exists using selenium python](https://stackoverflow.com/questions/19003003/check-if-any-alert-exists-using-selenium-with-with python)
If you are able to figure it out, please remove the the
@unittest.skip
lines above the test cases.Most recent build failure
The text was updated successfully, but these errors were encountered: