Spaces:
Running
Running
Update tools/scroll_page.py
Browse files- tools/scroll_page.py +4 -4
tools/scroll_page.py
CHANGED
@@ -6,11 +6,11 @@ class ScrollPageTool(Tool):
|
|
6 |
name = "scroll_page"
|
7 |
description = "Scrolls the page to a specific element or by a number of pixels."
|
8 |
inputs = {
|
9 |
-
"selector": {"type": "
|
10 |
-
"num_pixels": {"type": "
|
11 |
-
"direction": {"type": "
|
12 |
}
|
13 |
-
output_type = "
|
14 |
|
15 |
def __init__(self, driver):
|
16 |
self.driver = driver
|
|
|
6 |
name = "scroll_page"
|
7 |
description = "Scrolls the page to a specific element or by a number of pixels."
|
8 |
inputs = {
|
9 |
+
"selector": {"type": "string", "default": None, "description": "CSS selector to scroll to"},
|
10 |
+
"num_pixels": {"type": "integer", "default": 1200, "description": "Number of pixels to scroll"},
|
11 |
+
"direction": {"type": "string", "default": "down", "description": "Scroll direction: 'down' or 'up'"}
|
12 |
}
|
13 |
+
output_type = "string"
|
14 |
|
15 |
def __init__(self, driver):
|
16 |
self.driver = driver
|