Action Types

Click Action

Click on an Element

This type of action will be created by Bytebot when prompted to execute an operation that requires clicking on an Element. For example, the prompts “click on the login button” or “open the selection menu” will create this type of action.

Example:

1// On a page with an 'Add to Cart' button
2const actions = await bytebot.act("Add item to the cart", page);

Example of returned actions:

1[
2 {
3 type: "Click",
4 xpath: "/html/body/div[1]/div[2]/div[2]/button",
5 }
6]

When executed, this action will return null as it does not have any output.

1await bytebot.execute(actions, page) // Click is a void action