I need help finding a TestCafe selector that can target an element with the same class name that appears multiple times in my HTML code. Here's what I have tried so far:
https://i.sstatic.net/ZS691.png
Despite trying various selectors, I have been unsuccessful as the element is not found in the DOM
this.policyretrieve_item2=Selector('.c-text u-text-sm--right u-weight--600')
this.policyretrieve_item2=Selector('.c-text u-text-sm--right').nth(4)
this.policyretrieve_item2=Selector('.c-text u-text-sm--right')
If the element exists, I expect the following code to work:
.expect(this.policyretrieve_item2.exists).ok('Some values after policy search are not displayed', { timeout: config.general.shortTimeout })