click inconsistencies

Asked by Gary Paschke on 2017-10-30

We are trying to use SikuliX-1.1.1 to automate regression testing. The tool works fine for several simple menu clicks. However, it fails to 'Click' the menu sometimes. We always run the application on the same Windows 10 PC 64bit at Full screen mode, so we are not moving anything on the screen. The cursor goes to the correct position and highlights the button, but fails to actually activate (Click) and just hangs there. We’ve tried to modify the ‘Matching Preview’ and Target Offsets’ of the image with no better results.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-10-30
Last reply:
2017-11-01

This question was originally filed as bug #1728595.

RaiMan (raimund-hocke) said : #1

I do not accept such kinds of problems as bugs, since based on the Java Robot used underneath: If a click sometimes works and sometimes does not (supposing the click position is correct), it is usually a timing problem: the GUI is not yet ready to accept the click at the time it is issued. Adding short waits before actually clicking sometimes helps.

arminius (arminius75) said : #2

maybe try

    while True:
        if exists(image):
             click(image)
        else:
            wait(5)

Can you help with this problem?

Provide an answer of your own, or ask Gary Paschke for more information if necessary.

To post a message you must log in.