Skip to main content

UIElement


Methods

click

public

Click UIElement.

Usage
const okButton = await ui.find(By.path('Object path'));
await gamium.wait(Until.elementInteractable(okButton));
await okButton.click();
Arguments
Returns

drag

public

Drag the UIElement.

Usage
const handle = await ui.find(By.path('Object path'));
await gamium.wait(Until.elementInteractable(handle));
await handle.drag(
{
x: handle.gameObject.info.screenPosition.x - 30,
y: handle.gameObject.info.screenPosition.y,
},
{ durationMs: 1000, intervalMs: 100 },
);
Arguments
Returns

getText

public

Import text if it is a UIElement that has text.

Usage
const questObject = await ui.find(By.path('Object path'));
const progress = questObject.getText();
Returns

isInteractable

public

Verify that UIElement is interactive. To return to true, you must pass a number of conditions. Option allows you to override some conditions.

Usage
const okButton = await ui.find(By.path('Object path'));
const isInteractable = await okButton.isInteractable();
Arguments
Returns

refresh

public

Updates the information that the object has.

Usage
const okButton = await ui.find(By.path('Object path'));
await okButton.refresh();
Returns

scroll

public

Scroll by delta from UIElement.

Usage
const dragger = await ui.find(By.path('Object path'));
await gamium.wait(Until.elementInteractable(dragger));
await dragger.scroll({ x: 0, y: -0.5 }, { durationMs: 2000 });
Arguments
Returns

setText

public

Enter text in UIElement.

Usage
const text1 = await ui.find(By.path('Object path'));
await text1.setText('Hello World').perform();
Arguments
Returns

tryIsInteractable

public
Arguments
Returns

tryWaitInteractable

public
Arguments
Returns

waitInteractable

public

Wait for UIElement to interact..

Usage
const okButton = await ui.find(By.path('Object path'));
await okButton.waitInteractable();
Arguments
Returns

Properties

info ObjectInfo