Agentic actions

click

Click on an element on the page using a natural language description.

def click(self, element_description: str) -> None
element_description
string
required

Natural language description of the element to click.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

If you need to upload or download files during a click, you can use the click_and_upload or click_and_download actions.

exists

Check if an element exists on the page.

def exists(element_description: str) -> Tuple[bool, str]
element_description
string
required

Natural language description of the element to check.

return
Tuple[bool, str]

A tuple containing:

  • exists (bool): Whether the element exists.
  • reasoning (str): The reasoning behind whether the element exists.
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

hover

Hover over an element on the page using a natural language description.

def hover(element_description: str) -> None
element_description
string
required

Natural language description of the element to hover over.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

scroll_to_element

Scroll to an element on the page using a natural language description.

def scroll_to_element(element_description: str) -> None
element_description
string
required

Natural language description of the element to scroll to.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

Non-agentic actions

goto

Navigate to a specific URL.

def goto(self, url: str) -> None
url
string
required

The URL to navigate to.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

type

Type text into an input field using a natural language description.

def type(text: str) -> None
text
string
required

The text to type into the input field.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

press_enter

Press the enter key on the keyboard.

def press_enter() -> None
return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

scroll

Scroll the page by a specified number of pixels.

def scroll(scroll_amount: int) -> None
scroll_amount
int
required

The amount of pixels to scroll by.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

wait

Wait for a specified amount of time.

def wait(wait_time: int) -> None
wait_time
int
required

The amount of time to wait in milliseconds.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.

return
None
raises
ValueError

Raises ValueError if the API request fails or if the API key is not set.