Action Types

AssignAttribute Action

Assign a value to an attribute on an Element

This type of action will be created by Bytebot when prompted to execute an operation that requires assigning a certain value to an attribute of an Element. For example, when prompted to check a checkbox, Bytebot will create an AssignAttribute action to assign the value true to the checked attribute of the checkbox.

This action will return null as it does not have any output.

Example:

1// On a page with a list that can be filtered by size using checkboxes
2const actions = await bytebot.prompt("Filter the list by size 'medium'", page);

Example of returned actions:

1[
2 {
3 actionType: "assignAttribute",
4 xpath: "/html/body/div[1]/div[2]/div[2]/input",
5 attribute: "checked",
6 value: "true",
7 result: null
8 }
9]