I am using GetClone method as there are many same image link on a webpage. I need to open each image link one by one. The link will be open in the same tab and after completing the task return to same webpage and needs to click on 2nd image link. But when it return it throws an exception saying ex.(Unable to find contextId for key:00000000000).
If you are clicking on a link, then that is going to navigate away from the clone collection. When you return, a new clone collection would get created. You can't really iterate a collection if it is changing while iterating it. This one may get tricky. Since the clone collection isn't in a guaranteed order, you'll need to come up with some other way to identify each image that you are clicking on. Perhaps the ElementID of each link is unique to each image. If that's the case, you can iterate that.