Basic Actions

In test code, basic elements have access to a basic actions API. Call the API to get, set, and wait for UI element state without walking the DOM.

Every basic element has a type property that determines which basic actions it supports.

Like most basic actions, getText() is available from every basic element. You probably already noticed it since it's used in the test code of most tutorials.

This tutorial's liByTitle basic element doesn't have a type property, so it has access to the base element actions available to all basic elements. UTAM generates the getLiByTitle method—notice the return type.

getLiByTitle(title: string): Promise<(_BaseUtamElement)>;

Test code calls the method three times to get three elements with specific title values.

From these elements, you can call any base element action. This test calls getText() to get the run-time values and assert that they match what's expected.

Click Run Test.

Tip: Try calling another basic action, like isPresent().