Please take note of that: if you have eight elements on the page with the same class, you can write
Selector('.class'). This selector corresponds to all of eight elements.
console.log(await Selector('.class').count) -> 8
But if you use this selector in action, for example
t.click(Selector('.class')) TestCafe will execute click only for the first element with this class.
You can see the following information in our documentation:
If the selector returns multiple DOM nodes, you must filter them to select a single node that will eventually be returned by the selector. The selector provides methods to filter DOM nodes by their index, text, attributes, etc.
So, in your case, you can use the element's index in the elements set to identify required element:
Selector('.class').nth(index) or text, attribute or something else.