Find Mobile Element

A Find Mobile Element block is used to find a mobile element in an application. When you click Expand, the block lists the below properties:

 
find-mobile-element-leapwork-building-block

The Block Header (“Find Mobile Element”)

The green input connector in the header is used to trigger the block to start executing.

The green output connector in the header triggers when the mobile element has been successfully found.

The title of the block (“Find Mobile Element”) can be changed by double-clicking on it and typing in a new title.

Select Mobile Element

This property contains the locator for the mobile element to be found.

A mobile element locator can be captured by right-clicking on the property and selecting “Capture new mobile element”.

The property can be cleared by right-clicking and selecting “Clear mobile element”.

Found Element

This property contains the found mobile element in the application. This can be used as the source element in other building blocks.

Not found

This green output connector triggers if the mobile element is not found before the timeout (see below). This is typically used to branch execution flow or to explicitly fail a case by linking it to a Fail block.

Position found

The position where the mobile element was found in X, Y coordinates in the application.

Click the expander button to work with the X and Y coordinates separately.

Area found

The position and size of the found mobile element in X, Y, Width, Height coordinates in the application.

Click the expander button to work with the area’s position and size and their nested sub-properties separately.

Default timeout

If the 'Default Timeout' property checkbox is not selected, then the timeout value is 60 seconds. If the 'Default Timeout' property checkbox is selected, then the 'Default timeout' value selected in the flow settings will be applicable.

Timeout

The maximum time spent searching for the mobile element before giving up and triggering “Not found” (see above).

Note: All cases have a “global timeout” that can be configured in the “Settings” panel. This is unrelated to the timeout of a single building block. However, a running case will automatically be cancelled if it runs for longer than the global timeout.

Await not found

When checked, the building block will assume that the mobile element is currently present and will wait until it can no longer be found on the screen before proceeding.

This can be useful for instance when waiting for a “Loading…” message to disappear in an application.