Skip to main content
Prefer Agent.execute() for interactions that require finding elements visually. Use Computer methods when you know exact coordinates or need precise keyboard input.

click_at()

computer.click_at(x: int, y: int, button: str = "left") -> None
Click at specific screen coordinates.
ParameterTypeDefaultDescription
xintX coordinate
yintY coordinate
buttonstr"left""left" or "right"
def run(params: Params) -> Result:
    computer = Computer()
    computer.click_at(100, 200)              # Left click
    computer.click_at(100, 200, button="right")  # Right click

move()

computer.move(x: int, y: int) -> None
Move the cursor without clicking.
def run(params: Params) -> Result:
    computer = Computer()
    computer.move(500, 300)

scroll()

computer.scroll(direction: str = "down", amount: int = 3, x: int | None = None, y: int | None = None) -> None
Scroll the page.
ParameterTypeDefaultDescription
directionstr"down""up" or "down"
amountint3Number of scroll ticks
xint | NoneNoneScroll at X coordinate
yint | NoneNoneScroll at Y coordinate
def run(params: Params) -> Result:
    computer = Computer()
    computer.scroll()                          # Scroll down 3 ticks
    computer.scroll("up", 5)                   # Scroll up 5 ticks
    computer.scroll("down", 3, x=400, y=300)  # Scroll at specific coordinates