← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245849]: exists() but cannot click()

 

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

    Status: Answered => Open

Ray Bobak is still having a problem:
I added some screen captures and have proven to myself that sikuli gets
'lost' after processing for a bit.  While I did not capture the initial
failure image, I did capture an image after restarting a script.  I
watched as the mouse arrow remained motionless as the script ran.  After
a short while the script fails.

code snippet
    if mainWin.exists("1395554772408.png"):  #captured imaged shows this button in both fullscreen and mainWin captures
        print 'click uninstall'
        mainWin.click("1395554772408.png") # mouse did not move to this so could never have clicked it. 
        #wait(3)
        print 'click ok to uninstall'
        mainWin.wait(Pattern("1392777180952.png").similar(0.90),30) # without above click, this wait should fail it didn't
        mainWin.click(Pattern("1392777180952.png").similar(0.90))
    print 'mainWin =',mainWin
    beforeInstall = capture(mainWin)
    print 'mainWin captured before install to',beforeInstall
    beforeFSInstall = capture(fullscreen)
    print 'fullscreen captured before install to',beforeFSInstall
    mainWin.wait(Pattern("1395554852794.png").similar(0.90),60) # this failed because image not on screen 


the log ...
  
click uninstall

[log] CLICK on L(1112,203)@S(0)[0,0 5760x1080]

click ok to uninstall

[log] CLICK on L(1462,870)@S(0)[0,0 5760x1080]

mainWin = R[0,0 1920x1080]@S(0)[0,0 5760x1080] E:Y, T:3.0

mainWin captured before install to
C:\Users\kris\AppData\Local\Temp\sikuli-2040819777259839293.png

fullscreen captured before install to
C:\Users\kris\AppData\Local\Temp\sikuli-1448569504283501216.png

[error] script [ pass4 ] stopped with error in line 1904
[error] FindFailed ( can not find P(1395554852794.png) S: 0.9 on the screen. )


the two clicks NEVER happened as I wattched the mouse sit motionless during the execution.  the images captured show the image file from the first click on the screen.

there is obviously an aging issue here.   Once it is in this state,
further executions result in repeats of the same failure.  However, if
shutdown and restart the script, it works correctly.

Obviously this cannot be debugged from my log file.  I need a code
snippet that will turn on and turn off  whatever failure data capture
features are in sikuli/jython/java.   Adding code and rerunning causes
code to work correctly again so the capture needs to be there until the
failure.  (I have to  assume that pressing run does not regenerate
bytecode unless scripts have been changed.)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.