I have an Image displayed in Three locations one below the other, whenever i perform a search based on the image properties, i.e
If imagefound (Text:baseVersion 1.0, TextSize:“12”,TextFont:“LucidaGrande”, TextColor:(0,0,0),TextBackgroundColor:(212,221,230))
Click foundimagelocation ()
When ever i execute this it always finds the first occurrence of the image.
I tried using searchRectangle function but i am not able to achieve it.
All i Need is when i run the following above code in a repeat loop it has to get the imagelocation of first occurance and when it tries to execute for the second time, it has to set the search area to greater than the imagelocation which it finds initially,
Can anyone help me out to achieve this.
I am attaching the Image screen foir reference
Thanks in advance!
The easiest way to do this is usually with the EveryImageLocation() function:
repeat with EveryImageLocation((Text:baseVersion 1.0, TextSize:"12",TextFont:"LucidaGrande", TextColor:(0,0,0),TextBackgroundColor:(212,221,230)))
I think this will accomplish what you are looking for, but if not, let us know what’s missing and we can help you figure out the rest.
Thanks for your reply, but when i use the following function( everyimagelocation() ) with “repeat with”, it gives me syntax error, i even tried using “repeat for” also , i am getting the following error with this,
Value is not a number: ‘((423,315),(423,349),(423,3…’
Here all i need is to find the Image “baseVersion” using text property and click on the adjacent check box,
Click on the adjacent Check box is via Hotspot , but i want to check the occurrence of all image location and click it.
My Apporach of acheving this is ,
First time when we run the repeat loop ,
Get the Imagelocation and next time when we search we need to set the SearchRectangle greater than the first Imagelocation coordinates, But i dont know how to get the first imagelocation and set the search rectangle greater than the first location i.e X Y Coordinates .
Please let me know in case if you require any further information on the same.
Sorry, made a small mistake in the code. Missed the iterator on the repeat. It should have looked like this:
repeat with each item of EveryImageLocation((Text:baseVersion 1.0, TextSize:"12",TextFont:"LucidaGrande", TextColor:(0,0,0),TextBackgroundColor:(212,221,230)))
You can override the hotspot by setting a hotspot property in the text property list so that it clicks on the checkbox instead of on the word itself.