Skip to content

Commit 638e8a2

Browse files
committed
Improve method reliability
1 parent bb6a547 commit 638e8a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def update_text(
625625
if self.__is_shadow_selector(selector):
626626
self.__shadow_type(selector, text, timeout)
627627
return
628-
element = self.wait_for_element_visible(
628+
element = self.wait_for_element_clickable(
629629
selector, by=by, timeout=timeout
630630
)
631631
self.__demo_mode_highlight_if_active(selector, by)
@@ -638,7 +638,7 @@ def update_text(
638638
except (StaleElementReferenceException, ENI_Exception):
639639
self.wait_for_ready_state_complete()
640640
time.sleep(0.16)
641-
element = self.wait_for_element_visible(
641+
element = self.wait_for_element_clickable(
642642
selector, by=by, timeout=timeout
643643
)
644644
try:
@@ -672,7 +672,7 @@ def update_text(
672672
except (StaleElementReferenceException, ENI_Exception):
673673
self.wait_for_ready_state_complete()
674674
time.sleep(0.16)
675-
element = self.wait_for_element_visible(
675+
element = self.wait_for_element_clickable(
676676
selector, by=by, timeout=timeout
677677
)
678678
element.clear()
@@ -2667,7 +2667,7 @@ def load_html_string(self, html_string, new_page=True):
26672667
"""Loads an HTML string into the web browser.
26682668
If new_page==True, the page will switch to: "data:text/html,"
26692669
If new_page==False, will load HTML into the current page."""
2670-
self.__check_scope()
2670+
self.wait_for_ready_state_complete()
26712671
new_lines = []
26722672
lines = html_string.split("\n")
26732673
for line in lines:
@@ -12209,7 +12209,6 @@ def __click_with_offset(
1220912209
):
1221012210
from selenium.webdriver.common.action_chains import ActionChains
1221112211

12212-
self.__check_scope()
1221312212
if not timeout:
1221412213
timeout = settings.SMALL_TIMEOUT
1221512214
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
@@ -12224,6 +12223,7 @@ def __click_with_offset(
1222412223
self.__slow_scroll_to_element(element)
1222512224
else:
1222612225
self.__scroll_to_element(element, selector, by)
12226+
self.wait_for_ready_state_complete()
1222712227
if self.demo_mode and mark is None:
1222812228
mark = True
1222912229
if mark:

0 commit comments

Comments
 (0)