We're excited to share a new enhancement designed to help teams get more accurate element finds in mobile tests. Starting with Desktop App version 2.33.5, mabl automatically generates and saves natural-language based element descriptions for all recorded mobile tap steps! During execution, if the target element’s native attributes are insufficient, mabl uses these generated element descriptions to assist in locating the element.
This enhancement builds on our original visual find feature, which introduced a way to reliably target elements that lacked unique text-based attributes, such as images and canvas elements. The initial release of visual find still required users to manually create the step, which included drawing visual areas on and generating descriptions. Now, mabl automatically captures the visual description for you when you record mobile taps, so you can get the benefits of more reliable finds without the need for manual edits!
Try it out
To see the new visual find in action, launch a mobile app in the Trainer and record a tap step. When you click on the pencil to edit the step, you'll see a new field called Element description.
During execution, if mabl can't find the target element using native attributes such as class or text, it uses this Element description to locate the target element.
Control how mabl finds the element
To specify how you want mabl to find the target element, use the Primary find method drop-down:
- Native attributes: use text-based attributes from the page source, such as class or text
- Element description: use the NL-generated visual find description to locate the element
- XPath only: only find the element using the recorded XPath, which cannot be edited
Select a different element
If you want to change the target element, click on the Reselect button and choose a new element. mabl will generate a new element description after the new element is selected.
To ensure the element description gets the best possible match, the Trainer also performs a test find with the updated description and provides a preview of the find result. If the description fails to highlight the correct element, you may manually update the description and test it out until you are satisfied with the results.
Use "Visual area" for difficult-to-target elements
For elements that can't be easily selected using the native element approach, such as canvas elements, use the Visual area option and draw an area on the device screen where the tap should occur. This method is the unchanged from what we released with the initial launch of visual find tap steps.
When you target an element with Visual area, mabl only uses the visual element description to perform a find during test execution. The step will not include Native element attributes or a Primary find method. If you want to switch back to Native element and capture these attributes and settings, click on the Select button and select the target element.