Distinguishing between similar looking images

Hi,

Currently we are evaluating Eggplant and I am new to Eggplant, in web drivers like Watir or Selenium, you can use object id or iterate thru the objects easily and distinguish easily, what is the preferred method in Eggplant for the following task.

Example: A form has a 3 buttons of same shape and size with same captions 'Add new step' at different locations, but each button has a separate function one may add sub step, one main step etc.., what is the best method to distinguish one from the other?

Thanks
Jag

Comments

  • Hi Jag--

    To iterate through each occurrence, you can use the EveryImageLocation() function. It returns a list of every location of an item on the screen and then you can either loop over it and do something with each:
    put everyImageLocation("SomeIMage") into locations
    repeat with each location in locations
      //do something
    end repeat
    
    or you can access a specific one:
    click item 2 of everyImageLocation("SomeIMage")
    
    If you are evaluating eggPlant, it's a good idea to send an email to the technical contact that you were on the demo with, so that they can respond to you as quickly as possible.

    Allen
Sign In or Register to comment.