UI
UI Controling has a description. Class for easy UI manipulation.
Methods
click
public
Wait for the specified object to be found through Locator
. If the object is found, wait until interaction is possible. Click if interaction is possible.
Usage
await ui.click(By.path('Object path'));
Arguments
locator
Locator
options
Partial
<FindObjectOptions
&ActionsClickOptions
>
Returns
drag
public
Wait for the specified object to be found through Locator
. If the object is found, wait until interaction is possible. If interaction is possible, start the drag.
Usage
await ui.drag(By.path('Object path'), { x: 0, y: 0 });
Arguments
locator
Locator
options
Partial
<FindObjectOptions
&ActionsDragOptions
>
Returns
find
public
Wait for the specified object to be found through Locator
. If an object is found, it is considered to be UIElement
and returns the object
Usage
const elem = await ui.find(By.path('Object path'));
Arguments
locator
Locator
options
Partial
<FindObjectOptions
>
Returns
finds
public
Finds the objects specified through Locator
. If the objects are found, consider them as UIelement
and return the objects
Usage
const elems = await ui.finds(By.path('Object path'));
Arguments
locator
Locator
options
Partial
<FindObjectOptions
>
Returns
getText
public
Wait for the specified object to be found through Locator
. If the object is found, wait until interaction is possible. Returns Text if interaction is possible and Text exists.
Usage
const progress = await ui.getText(By.path('Object path'));
Arguments
locator
Locator
options
Partial
<FindObjectOptions
>
Returns
scroll
public
Wait for the specified object to be found through 'Locator'. If the object is found, wait until interaction is possible. Start scrolling if interaction is possible.
Usage
await ui.scroll(By.path('Object path'), { x: 0, y: -0.1 });
Arguments
locator
Locator
delta
Vector2
- Delta value to scroll based on Obejct's screen coordinates searched by locator. The screen coordinates.
options
Partial
<FindObjectOptions
&ActionsScrollOptions
>
Returns
setText
public
Wait for the specified object to be found through 'Locator'. If the object is found, wait until interaction is possible. If you can interact and type Text, type Text.
Usage
await ui.setText(By.path('Object path'), 'Hello, World!');
Arguments
locator
Locator
text
string
options
Partial
<FindObjectOptions
>
Returns
tryFind
public
Arguments
locator
Locator
options
Partial
<FindObjectOptions
>
Returns
tryFinds
public
Arguments
locator
Locator
options
Partial
<FindObjectOptions
>