Skip to main content

Functions

Arguments:
  • x, y (int): The screen coordinates to move the mouse.
  • click_type (str): The mouse button to click ("left", "middle", or "right").
Returns:
  • None
Arguments:
  • x, y (int): The screen coordinates to move the mouse.
  • scroll_x (int): Horizontal scroll offset.
  • Negative => Scroll left (button 6)
  • Positive => Scroll right (button 7)
  • scroll_y (int): Vertical scroll offset.
  • Negative => Scroll up (button 4)
  • Positive => Scroll down (button 5)
Behavior:
  • Moves the mouse to (x, y).
  • Scrolls by scroll_x and scroll_y
Returns:
  • None
Arguments:
  • keys (list[str]): A list of keys to press. Example: ["CTRL", "f"] for Ctrl+F.
Behavior:
  • Executes a keypress
  • Supports shortcuts like Ctrl+Fs
Returns:
  • None
Arguments:
  • text (str): The string of text to type.
Behavior:
  • Types a string of text at the current cursor location.
Returns:
  • None
Behavior:
  • Takes a screenshot as a png
  • Captures the base64 result.
  • Returns that base64 string.
Returns:
  • (str): A base64-encoded PNG screenshot.
Exceptions:
  • RuntimeError if the screenshot command fails.
Arguments:
  • url (str): The URL to navigate to (e.g., https://example.com).
Behavior:
  • Opens Firefox in the container and navigates to the specified URL in a new tab
Returns:
  • None
Arguments:
  • query (str): JavaScript query to retrieve the HTML content. Defaults to 'return document.documentElement.outerHTML;', which returns the full DOM HTML.
Behavior:
  • Uses the underlying agent to execute a JavaScript query and retrieve the current webpage’s HTML content.
Returns:
  • (str): The HTML content of the current page, or an error message if retrieval fails.