Skip to content

Commit 09aea8b

Browse files
committed
Clone an existing method with an additional name
1 parent 6d11358 commit 09aea8b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

help_docs/method_summary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ self.find_element(selector, by=By.CSS_SELECTOR, timeout=settings.LARGE_TIMEOUT)
256256
self.assert_element(
257257
selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT)
258258

259+
self.assert_element_visible(
260+
selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT)
261+
259262
########
260263

261264
self.wait_for_text_visible(text, selector="html", by=By.CSS_SELECTOR,

seleniumbase/fixtures/base_case.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,6 +2051,15 @@ def assert_element(self, selector, by=By.CSS_SELECTOR,
20512051
self.__highlight_with_assert_success(messenger_post, selector, by)
20522052
return True
20532053

2054+
def assert_element_visible(self, selector, by=By.CSS_SELECTOR,
2055+
timeout=settings.SMALL_TIMEOUT):
2056+
""" Same as self.assert_element()
2057+
As above, will raise an exception if nothing can be found. """
2058+
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
2059+
timeout = self.__get_new_timeout(timeout)
2060+
self.assert_element(selector, by=by, timeout=timeout)
2061+
return True
2062+
20542063
# For backwards compatibility, earlier method names of the next
20552064
# four methods have remained even though they do the same thing,
20562065
# with the exception of assert_*, which won't return the element,

0 commit comments

Comments
 (0)