How to make EggPlant to click on second duplicate image?


I have multiple dropdown boxes on one page. EggPlant seems to always click on the first one. I know that I can append the co-ordinates to the FoundImageLocation(). Is there a better way (or function that I can use) to make EggPlant to click on the duplicate image on different locations as specified?

Your help is appreciated.

If your dropdowns have labels, then you should use the “relative hotspot” technique. See page 10 of the Using Eggplant manual in the Help.

Otherwise, you can use the EveryImageLocation() function and click the index of the one you want:

click item 2 of everyImageLocation("dropdownboximage")