-
Notifications
You must be signed in to change notification settings - Fork 0
API App
The default app enum contains the some packages that are installed by default. The enum currently holds:
CHROME
CAMERA
Creates a new app element. Reads the rawElement attributes to create the element.
Clicks this element. Doesn't autoscroll to the make the element visible right now
const hierarchy = await emulator.hierarchy();
const element = hierarchy.findElementsByText("Chrome")[0];
await element.click();
Types the given text into the element. The element gets clicked before typing automatically. No other buttons except the ones required to create the text will be pressed in the process (No enter / closing of the keyboard)
const hierarchy = await emulator.hierarchy();
const searchField = hierarchy.findElementsByText("Search or type", true)[0];
await searchField.type("https://www.npmjs.com/package/gotron");
Gets the raw element
Get the index of the element
Get the text of the element
Get the resourceId of the element
Get the classname of the element
Get the packageName of the element
Get the content description of the element
Get if the element is checkable
Get if the element has been checked
Get if the element can be clicked
Get if the element has been enabled
Get if the element is focusable
Get if the element is already focused
Get if the element is scrollable
Get if you can long click the element
Get if the elment is a password field
Get if the element has been selected
get bounds(): Bounds
Get the element's bounds