assertVisible Command

Syntax

assertVisible.id: "<element id>"

or

assertVisible.text: "<text>"

Example:

assertVisible.id: "com.app.ui/loginBtn"

or

assertVisible.text: "Log in"

Note: The assertVisible.id and assertVisible.text commands verify whether an element with the specified ID or a specific text is visible on the screen.

In the first example above, GPT Driver will check if an element with the ID com.app.ui/loginBtn is visible. If the element is not visible, GPT Driver will fail the test. If it is visible, GPT Driver will proceed to the next step. On the second example, GPT Driver will then check if the specific text Log in is visible

Last updated