<p dir="auto">A Locator object apparently can be resolved to several elements, so can represent a list.<br>
And there are some useful methods to use in this case (e.g. <code class="notranslate">Locator.first()</code> <code class="notranslate">Locator.nth()</code> etc).<br>
Same time, If I need to iterate several locators, the only way I see (please correct me if I'm wrong) is to  get the count first, and then take each new item by index from locator list manually:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let itemsCount = await this.pickLkistItem.count() // find the count
for (let index = 0; index &lt; itemsCount; index++) { 
    let item = this.pickLkistItem.nth(index) //get the element by index within locator list
    // . . . do what you need
}"><pre class="notranslate"><code class="notranslate">let itemsCount = await this.pickLkistItem.count() // find the count
for (let index = 0; index &lt; itemsCount; index++) { 
    let item = this.pickLkistItem.nth(index) //get the element by index within locator list
    // . . . do what you need
}
</code></pre></div>
<p dir="auto">And this looks really overwhelming.<br>
If a locator can be a list, could we use the Iterable functions instead? E.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for (const item of [this.pickLkistItem]) {
      item // . . . do what you need
}"><pre class="notranslate"><code class="notranslate">for (const item of [this.pickLkistItem]) {
      item // . . . do what you need
}
</code></pre></div>
<p dir="auto">Or:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.pickLkistItem.forEach(it =&gt; { arr.push(await it.textContent()) });
this.pickLkistItem.reduce((result, item) =&gt; { . . . }"><pre class="notranslate"><code class="notranslate">this.pickLkistItem.forEach(it =&gt; { arr.push(await it.textContent()) });
this.pickLkistItem.reduce((result, item) =&gt; { . . . }
</code></pre></div>
<p dir="auto">I guess that the count of the locator items should be frozen at the point of the iterable function start, so if it increases, additional iterations are ignored. Otherwise, a 'missing element' error should be thrown if the count decreased</p>
<p dir="auto">Or I'm missing something and this is already supported somehow?</p>
<p dir="auto">Hey Team,</p>
<p dir="auto">I think the Locator feature is really great, but what I think it lacks is some kind of enumeration. There are evaluations and stuff like getting text from all elements, but that's only a limited use case. While it is possible for us to enumerate by ourselves, I think we could benefit much more from a built in enumerator instead of opting for a for loop. This would allow plugging into more useful features of supported languages for working with collections much easier.</p>
<p dir="auto">It would then be possible to enumerate in:</p>
<ul dir="auto">
<li>Node.js</li>
<li>.NET</li>
<li>Python</li>
<li>and probably Java</li>
</ul>