← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #660710]: [1.1.0] script stuck in click() or hover()

 

Question #660710 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660710

Summary changed to:
[1.1.0] script stuck in click() or hover()

Description changed to:
Hi, i have a problem about script running issue!

First, i post my executing environment:
    - OS: Microsoft Windows 7 Home Premium 6.1.7601 Service Pack 1 Build 7601
    - Sikuli: 1.1.0
    - Language: python 2.7.10

===============================================================================

OK, i ran my whole script and it seldom stuck in the following block:

if exists(imgList[6], 2): # imgList[6] is an image path
    orgReg = getLastMatch()
    nextReg = orgReg.offset(orgReg.w, 0)
    nextReg.click()

===============================================================================

When i encountered this issue at the first time, i added debug code to
trace which line is root cause:

if exists(imgList[6], 2): # imgList[6] is an image path
    print "**** before getLastMatch() ****"
    orgReg = getLastMatch()
    print "**** between getLastMatch() and get new region ****"
    nextReg = orgReg.offset(orgReg.w, 0)
    print "**** between get new region and click() ****"
    nextReg.click()
    print "**** after click() ****"

I ran script and get the following output:

**** before getLastMatch() ****
**** between getLastMatch() and get new region ****
**** between get new region and click() ****

so script was stuck in click().

I replaced click() with hover(), script also seldom struck in hover().

===============================================================================

I do not know what factors can cause script struck in hover() or
click().

Thanks.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.