Skip to content

Commit e5ed87c

Browse files
authored
Merge pull request #824 from seleniumbase/update-error-handling
Update error handling
2 parents b60c7a0 + c347c50 commit e5ed87c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ livereload==2.6.3;python_version>="3.6"
44
joblib==1.0.1;python_version>="3.6"
55
Markdown==3.3.3
66
Jinja2==2.11.3
7-
readme-renderer==28.0
7+
readme-renderer==29.0
88
pymdown-extensions==8.1.1
9+
lunr==0.5.8
910
mkdocs==1.1.2
10-
mkdocs-material==6.2.8
11+
mkdocs-material==7.0.0
1112
mkdocs-simple-hooks==0.1.2
1213
mkdocs-material-extensions==1.0.1
1314
mkdocs-minify-plugin==0.4.0

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "1.55.6"
2+
__version__ = "1.55.7"

seleniumbase/console_scripts/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def show_basic_usage():
5757
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
5858
print(seleniumbase_logo)
5959
print()
60-
time.sleep(0.16) # Enough time to see the logo
60+
time.sleep(0.25) # Enough time to see the logo
6161
show_package_location()
6262
show_version_info()
6363
print()

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)