Browse documentation

TypeScript SDK

Observe and act

Build portable semantic actions and execute them against the live screen.

Observe

tsphone-use
const observation = await device.observe();

console.log(observation.rendered);
console.log(observation.elements);

Portable actions

tsphone-use
const observation = await device.observe();
const [firstAction] = observation.actions;

if (firstAction) {
  await device.act(firstAction);
}

Secrets

tsphone-use
device.secrets.set("password", process.env.APP_PASSWORD!);

await device.type("%password%", {
  field: "Password",
  submit: true,
});