Firoj112 commited on
Commit
96526b8
·
verified ·
1 Parent(s): e31363a

Update tools/scroll_page.py

Browse files
Files changed (1) hide show
  1. tools/scroll_page.py +2 -5
tools/scroll_page.py CHANGED
@@ -15,10 +15,7 @@ class ScrollPageTool(Tool):
15
  def __init__(self, driver):
16
  self.driver = driver
17
 
18
- def forward(self, **kwargs):
19
- selector = kwargs.get("selector")
20
- num_pixels = kwargs.get("num_pixels", 1200)
21
- direction = kwargs.get("direction", "down")
22
  try:
23
  if selector:
24
  element = self.driver.find_element(By.CSS_SELECTOR, selector)
@@ -34,4 +31,4 @@ class ScrollPageTool(Tool):
34
  else:
35
  return f"Invalid direction: {direction}"
36
  except Exception as e:
37
- return f"Failed to scroll: {str(e)}"
 
15
  def __init__(self, driver):
16
  self.driver = driver
17
 
18
+ def forward(self, selector=None, num_pixels=1200, direction="down"):
 
 
 
19
  try:
20
  if selector:
21
  element = self.driver.find_element(By.CSS_SELECTOR, selector)
 
31
  else:
32
  return f"Invalid direction: {direction}"
33
  except Exception as e:
34
+ return f"Failed to scroll: {str(e)}"