Skip to content

Commit 7a468ef

Browse files
committed
Handle other exception types generically, such as JavascriptException
1 parent f5309ea commit 7a468ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class MyTestClass(BaseCase):
4545
from seleniumbase.fixtures import page_utils
4646
from seleniumbase.fixtures import xpath_to_css
4747
from selenium.common.exceptions import (StaleElementReferenceException,
48-
TimeoutException,
4948
WebDriverException)
5049
from selenium.common import exceptions as selenium_exceptions
5150
try:
@@ -1153,8 +1152,8 @@ def wait_for_angularjs(self, timeout=settings.LARGE_TIMEOUT, **kwargs):
11531152
'suffix': suffix}
11541153
try:
11551154
self.execute_async_script(script, timeout=timeout)
1156-
except TimeoutException:
1157-
pass
1155+
except Exception:
1156+
time.sleep(0.05)
11581157

11591158
def wait_for_and_accept_alert(self, timeout=settings.LARGE_TIMEOUT):
11601159
if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:

0 commit comments

Comments
 (0)