Skip to content

Commit dc6715c

Browse files
committed
Update error-handling
1 parent b60c7a0 commit dc6715c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,12 @@ def go_forward(self):
571571
self.__demo_mode_pause_if_active()
572572

573573
def is_element_present(self, selector, by=By.CSS_SELECTOR):
574-
self.__check_scope()
574+
self.wait_for_ready_state_complete()
575575
selector, by = self.__recalculate_selector(selector, by)
576576
return page_actions.is_element_present(self.driver, selector, by)
577577

578578
def is_element_visible(self, selector, by=By.CSS_SELECTOR):
579-
self.__check_scope()
579+
self.wait_for_ready_state_complete()
580580
selector, by = self.__recalculate_selector(selector, by)
581581
return page_actions.is_element_visible(self.driver, selector, by)
582582

@@ -602,7 +602,7 @@ def is_link_text_present(self, link_text):
602602
""" Returns True if the link text appears in the HTML of the page.
603603
The element doesn't need to be visible,
604604
such as elements hidden inside a dropdown selection. """
605-
self.__check_scope()
605+
self.wait_for_ready_state_complete()
606606
soup = self.get_beautiful_soup()
607607
html_links = soup.find_all('a')
608608
for html_link in html_links:
@@ -614,7 +614,7 @@ def is_partial_link_text_present(self, link_text):
614614
""" Returns True if the partial link appears in the HTML of the page.
615615
The element doesn't need to be visible,
616616
such as elements hidden inside a dropdown selection. """
617-
self.__check_scope()
617+
self.wait_for_ready_state_complete()
618618
soup = self.get_beautiful_soup()
619619
html_links = soup.find_all('a')
620620
for html_link in html_links:
@@ -626,7 +626,7 @@ def get_link_attribute(self, link_text, attribute, hard_fail=True):
626626
""" Finds a link by link text and then returns the attribute's value.
627627
If the link text or attribute cannot be found, an exception will
628628
get raised if hard_fail is True (otherwise None is returned). """
629-
self.__check_scope()
629+
self.wait_for_ready_state_complete()
630630
soup = self.get_beautiful_soup()
631631
html_links = soup.find_all('a')
632632
for html_link in html_links:
@@ -658,7 +658,7 @@ def get_partial_link_text_attribute(self, link_text, attribute,
658658
value. If the partial link text or attribute cannot be found, an
659659
exception will get raised if hard_fail is True (otherwise None
660660
is returned). """
661-
self.__check_scope()
661+
self.wait_for_ready_state_complete()
662662
soup = self.get_beautiful_soup()
663663
html_links = soup.find_all('a')
664664
for html_link in html_links:

0 commit comments

Comments
 (0)