Skip to content

Commit e7b5572

Browse files
committed
Add extra names to scrolling methods for easier clarity
1 parent be77b5b commit e7b5572

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

help_docs/method_summary.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ self.press_left_arrow(selector="html", times=1, by=By.CSS_SELECTOR)
258258

259259
self.press_right_arrow(selector="html", times=1, by=By.CSS_SELECTOR)
260260

261-
self.scroll_to(selector, by=By.CSS_SELECTOR)
261+
self.scroll_to(selector, by=By.CSS_SELECTOR, timeout=None)
262+
# Duplicates: self.scroll_to_element(selector, by=By.CSS_SELECTOR)
262263

263-
self.slow_scroll_to(selector, by=By.CSS_SELECTOR)
264+
self.slow_scroll_to(selector, by=By.CSS_SELECTOR, timeout=None)
265+
# Duplicates: self.slow_scroll_to_element(selector, by=By.CSS_SELECTOR)
264266

265267
self.scroll_to_top()
266268

seleniumbase/fixtures/base_case.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,6 +2948,9 @@ def scroll_to(self, selector, by=By.CSS_SELECTOR, timeout=None):
29482948
)
29492949
self.__scroll_to_element(element, selector, by)
29502950

2951+
def scroll_to_element(self, selector, by=By.CSS_SELECTOR, timeout=None):
2952+
self.scroll_to(selector, by=by, timeout=timeout)
2953+
29512954
def slow_scroll_to(self, selector, by=By.CSS_SELECTOR, timeout=None):
29522955
""" Slow motion scroll to destination """
29532956
self.__check_scope()
@@ -2975,6 +2978,11 @@ def slow_scroll_to(self, selector, by=By.CSS_SELECTOR, timeout=None):
29752978
)
29762979
self.__slow_scroll_to_element(element)
29772980

2981+
def slow_scroll_to_element(
2982+
self, selector, by=By.CSS_SELECTOR, timeout=None
2983+
):
2984+
self.slow_scroll_to(selector, by=by, timeout=timeout)
2985+
29782986
def scroll_to_top(self):
29792987
""" Scroll to the top of the page. """
29802988
self.__check_scope()

0 commit comments

Comments
 (0)