Skip to main content

What is observe()?

This function is used to look for elements on the page.
await cuehand.observe("find the search bar at the top")
response
{
  "description": "Search models textbox",
  "method": "fill",
  "arguments": [ "" ],
  "selector": "xpath=/html[1]/body[1]/header[1]/nav[1]/div[2]/div[1]/form[1]/div[1]/input[1]"
}
Once you find the element, you can use act() to interact with it.
const [action] = await cuehand.observe(
  "click the search bar at the top"
);

if (action) {
  await cuehand.act(action);
};