MCPcopy
hub / github.com/stitionai/devika / scroll

Method scroll

src/browser/interaction.py:195–203  ·  view source on GitHub ↗
(self, direction)

Source from the content-addressed store, hash-verified

193 self.page_element_buffer = {}
194
195 def scroll(self, direction):
196 if direction == "up":
197 self.page.evaluate(
198 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;"
199 )
200 elif direction == "down":
201 self.page.evaluate(
202 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;"
203 )
204
205 def click(self, id):
206 # Inject javascript into the page which removes the target= attribute from all links

Callers 1

run_cmdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected