Control UI
You can obtain an object called UI
through the Game Driver
.
UI
provides an interface for easy UI manipulation.
You can use it as below.
Usage
- TypeScript
- Python
const ui = gamium.ui();
await ui.click(By.path('Object path'));
ui = gamium.ui()
ui.click(By.path('Object path'))
Auto wait
If you are using the class UI
, automatically do the wait
until you find it.
The above Usage works the same as below.
- TypeScript
- Python
const button = await ui.wait(By.path('Object path'));
await gamium.wait(Until.elementInteractable(button));
await button.click();
button = ui.wait(By.path('Object path'))
gamium.wait(Until.element_interactable(button))
button.click();