Skip to content

Commit 8d97e51

Browse files
committed
Add the new TextNotVisibleException
1 parent 8c71754 commit 8d97e51

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

seleniumbase/common/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ class OutOfScopeException(Exception):
2020

2121
class TimeLimitExceededException(Exception):
2222
pass
23+
24+
25+
class TextNotVisibleException(Exception):
26+
pass

seleniumbase/fixtures/shared_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from selenium.common.exceptions import NoSuchElementException
99
from selenium.common.exceptions import NoSuchFrameException
1010
from selenium.common.exceptions import NoSuchWindowException
11+
from seleniumbase.common.exceptions import TextNotVisibleException
1112
from seleniumbase import config as sb_config
1213

1314

@@ -28,6 +29,10 @@ def format_exc(exception, message):
2829
exc = NoSuchElementException
2930
elif exception == "NoSuchElementException":
3031
exc = NoSuchElementException
32+
elif exception == TextNotVisibleException:
33+
exc = TextNotVisibleException
34+
elif exception == "TextNotVisibleException":
35+
exc = TextNotVisibleException
3136
elif exception == NoAlertPresentException:
3237
exc = NoAlertPresentException
3338
elif exception == "NoAlertPresentException":

0 commit comments

Comments
 (0)