image click on multiple appearances
On the webpage that I'm trying to automate, there are three images in total that need to be clicked. First, an attack image. Second, a continue image. Third, a restart image. Sikuli should click the attack image, then move on to the continue image. Once the continue image is clicked, it needs to attack again. Here's a broken down, simplified order of what needs done.
Attack
Continue
Attack
Continue
Attack
Continue
Attack
Continue
Attack
Continue
Attack
Restart
Here is a sample script that I came up with to execute the above example. This, however, was quite slow. Each image click took approximately 1.5 seconds, which is extremely slow.
https:/
When I tried to modify the sample script to loop, it wouldn't work for me. It would only click one of the images, and then stop without error. Here is a sample script that I came up with to execute a looped script that should do the same as above.
https:/
This brings me to my question, and goal. I'd like the script to click the AttackImage whenever it's on screen, and when it's not on screen, click the ContinueImage. When neither of those are on screen, it should click the RestartImage, which would restart the loop of the script to go back to AttackImage, then ContinueImage, etc. How would I manage to do this successfully?
Oh, and this is sort of related to the question, but why does a crosshair appear before each click, which I run the script?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Alias for more information if necessary.