Although it is on another topic, maybe the following idea might help:
Create a list of xpaths (outside the loop) and then call the appropriate one based on the loop counter.
Although it is on another topic, maybe the following idea might help:
Create a list of xpaths (outside the loop) and then call the appropriate one based on the loop counter.