Find an image below another

Asked by Jeff Sant

Hi Guys,

I need to find an image under an image, following is my code

there are a lot of same images on page1, so we just need to choose 1 and click on it

reg=find(first_image)
reg.click(getLastMatch(),0)

when i click the image, it opens another option and i need to fill out forms and then go back to page1, on page 1 i need to click "Complete" button under the first_image

by clicking that button i get different ajax messages and the position of the button are moved lower, so how can i figureout the new position of the same first_image as there are lot of them.

right now i am just adding some value to it the first_image to reach Complete but sometimes it doesnt works as the messages are different

reg2 = Region(reg.x,reg.y+25,21,9)
reg2.click(reg2,0)

Any solution to this?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

currently no other solution available than just recalculating the position (or making a new find operation), if some appearing objects move the target button.

In a future version, there will be some tracking features.

Can you help with this problem?

Provide an answer of your own, or ask Jeff Sant for more information if necessary.

To post a message you must log in.