I’m trying to figure out how to use @POS with a user-defined variable counter instead of {!LOOP}
.
What I’m trying to do:
//*[text()[contains(.,'moss')]]@POS=${COUNTER}
Note:
Position support in link text locator
With CLICK link=Download@POS=3 you instruct the IDE to use the n-th (here n=3) occurrence of a locator. This is useful, for example, if a have a website with many download links, and you want to click the n-th once. POS is only supported with the “normal text” locator link=… but not with XPATH and CSS selectors.
So what’s an alternative to what I’m trying to accomplish?