Skip to content

Commit 4c9d891

Browse files
committed
Add a secondary method name for less confusion
1 parent dde3647 commit 4c9d891

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,10 +1979,17 @@ def find_text(self, text, selector, by=By.CSS_SELECTOR,
19791979
return self.wait_for_text_visible(
19801980
text, selector, by=by, timeout=timeout)
19811981

1982+
def assert_text_visible(self, text, selector, by=By.CSS_SELECTOR,
1983+
timeout=settings.SMALL_TIMEOUT):
1984+
""" Same as assert_text() """
1985+
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
1986+
timeout = self.__get_new_timeout(timeout)
1987+
return self.assert_text(text, selector, by=by, timeout=timeout)
1988+
19821989
def assert_text(self, text, selector, by=By.CSS_SELECTOR,
19831990
timeout=settings.SMALL_TIMEOUT):
1984-
""" Similar to wait_for_text_visible(), but returns nothing.
1985-
As above, will raise an exception if nothing can be found.
1991+
""" Similar to wait_for_text_visible()
1992+
Raises an exception if the element or the text is not found.
19861993
Returns True if successful. Default timeout = SMALL_TIMEOUT. """
19871994
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
19881995
timeout = self.__get_new_timeout(timeout)

0 commit comments

Comments
 (0)