Find UI elements in applications by role to enable desktop automation.
const buttons = await pipe.operator
.getByRole("button", {
app: "Chrome",
activateApp: true
})
.all(5);
const button = await pipe.operator
.getByRole("button", { app: "Chrome" })
.first();
await pipe.operator
.getById(button.id, { app: "Chrome" })
.click();
The response is of type object
.