While automating a normal list (<select> element), we can use any of the select NLPs available in Testsigma. However, there might be cases where the list items are populated/generated dynamically. These items will not have a <select> tag.
For such dynamic lists, you basically use two steps to automate such lists.
First, Open/reveal the list and Second, click on the list item that needs to be selected.
Here are the steps followed:
1. Add a step using the NLP ‘click on ui identifier’ to click on the list and create the UI Identifier for the element which opens the list.
2. Add next step using the same NLP 'click on ui identifier' to click on the item within the list. While recording the item in the list, firstly, click the list(you can ignore the green highlighter) to reveal the dynamic list items and then click on the actual item within the list to record it.
Note: While recording the dynamic list item in Step 2, it might take some extra time to load. Please wait for the few extra seconds for the dynamic list item to load and then click on the desired element while the green highlighter is shown.
That's all we need to do to automate Dynamic lists.