Skip to content

Commit b95faee

Browse files
committed
Better exception-handling
1 parent 519ea1e commit b95faee

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,11 @@ def click_link_text(self, link_text, timeout=None):
10281028
self.__demo_mode_highlight_if_active(link_text, by=By.LINK_TEXT)
10291029
try:
10301030
element.click()
1031-
except (StaleElementReferenceException, ENI_Exception):
1031+
except (
1032+
StaleElementReferenceException,
1033+
ENI_Exception,
1034+
ECI_Exception,
1035+
):
10321036
self.wait_for_ready_state_complete()
10331037
time.sleep(0.16)
10341038
element = self.wait_for_link_text_visible(
@@ -1153,7 +1157,11 @@ def click_partial_link_text(self, partial_link_text, timeout=None):
11531157
)
11541158
try:
11551159
element.click()
1156-
except (StaleElementReferenceException, ENI_Exception):
1160+
except (
1161+
StaleElementReferenceException,
1162+
ENI_Exception,
1163+
ECI_Exception,
1164+
):
11571165
self.wait_for_ready_state_complete()
11581166
time.sleep(0.16)
11591167
element = self.wait_for_partial_link_text(
@@ -1665,7 +1673,7 @@ def click_nth_visible_element(
16651673
try:
16661674
self.__scroll_to_element(element)
16671675
element.click()
1668-
except (StaleElementReferenceException, ENI_Exception):
1676+
except (StaleElementReferenceException, ENI_Exception, ECI_Exception):
16691677
time.sleep(0.12)
16701678
self.wait_for_ready_state_complete()
16711679
self.wait_for_element_present(selector, by=by, timeout=timeout)

0 commit comments

Comments
 (0)