Lists

To return all the elements from a list, add "returnAll": true to a selector.

The UTAM compiler generates a method that returns an array of elements.

getListItems(): Promise<(_BaseUtamElement)[]>;

If you change the value to false in the JSON on line 12, you see the method change to return a single element.

getListItems(): Promise<(_BaseUtamElement)>;

This behavior is similar to document.querySelector and document.querySelectorAll.

Click Run Test.