Skip to content

Commit 552c545

Browse files
committed
Deprecate scroll_click() because click() already scrolls before clicking
1 parent c75e9a3 commit 552c545

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,12 +1438,15 @@ def slow_scroll_to(self, selector, by=By.CSS_SELECTOR,
14381438
selector, by=by, timeout=timeout)
14391439
self.__slow_scroll_to_element(element)
14401440

1441+
@decorators.deprecated("Use self.click() - It now scrolls before clicking")
14411442
def scroll_click(self, selector, by=By.CSS_SELECTOR):
14421443
# DEPRECATED - self.click() now scrolls to the element before clicking
1443-
# self.scroll_to(selector, by=by)
1444+
# self.scroll_to(selector, by=by) # Redundant
14441445
self.click(selector, by=by)
14451446

14461447
def click_xpath(self, xpath):
1448+
# Technically self.click() will automatically detect an xpath selector,
1449+
# so self.click_xpath() is just a longer name for the same action.
14471450
self.click(xpath, by=By.XPATH)
14481451

14491452
def js_click(self, selector, by=By.CSS_SELECTOR):

0 commit comments

Comments
 (0)