← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #267709]: not working properly similar

 

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

Chp gave more information on the question:
My code in IDE sikuli:
def open_shop():
        print('open_shop')

        # check if its already opened
        shop_slide = Pattern("shop_slide-2.png").similar(0.90)
        shop_slide_match = exists(shop_slide, 3)
        if shop_slide_match:
            click(shop_slide_match.offset(Location(-25, 0)))
        else:
            # open, may be a slider
            click("building.png")
            shop_slide_match = exists("shop_slide-2.png", 5)
            if shop_slide_match:
                click(shop_slide_match.offset(Location(-25, 0)))
Debug.on(3)
for i in range(4):
    open_shop()
    click("dfsdf.png")

debug(3) log:
open_shop
[debug] Image: reused: shop_slide-2.png (file:/D:/Avto Testing Experiment.sikuli/shop_slide-2.png)
[debug] Region: exists: waiting 3,0 secs for P(shop_slide-2.png) S: 0.9 to appear in R[0,0 1920x1080]@S(0)

[debug] Region: exists: P(shop_slide-2.png) S: 0.9 has not appeared [877 msec]
[debug] Region: find: waiting 3,0 secs for building.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: building.png (file:/D:/Avto Testing Experiment.sikuli/building.png)

[debug] Region: find: building.png has appeared at M[1703,468 28x24]@S(S(0)[0,0 1920x1080]) S:1,00 C:1717,480 [501/501 msec]
[debug] CLICK on L(1717,480)@S(0)[0,0 1920x1080]

[debug] Region: exists: waiting 5,0 secs for shop_slide-2.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: shop_slide-2.png (file:/D:/Avto Testing Experiment.sikuli/shop_slide-2.png)

[debug] Region: exists: shop_slide-2.png has not appeared [1080 msec]
[debug] Region: find: waiting 3,0 secs for dfsdf.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: dfsdf.png (file:/D:/Avto Testing Experiment.sikuli/dfsdf.png)

[debug] Region: find: dfsdf.png has appeared at M[1494,329 35x29]@S(S(0)[0,0 1920x1080]) S:0,96 C:1511,343 [370/370 msec]
[debug] CLICK on L(1511,343)@S(0)[0,0 1920x1080]

open_shop
[debug] Image: reused: shop_slide-2.png (file:/D:/Avto Testing Experiment.sikuli/shop_slide-2.png)
[debug] Region: exists: waiting 3,0 secs for P(shop_slide-2.png) S: 0.9 to appear in R[0,0 1920x1080]@S(0)

[debug] Region: exists: P(shop_slide-2.png) S: 0.9 has not appeared [920 msec]
[debug] Region: find: waiting 3,0 secs for building.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: building.png (file:/D:/Avto Testing Experiment.sikuli/building.png)

[debug] Region: checkLastSeen: still there
[debug] Region: find: building.png has appeared at M[1703,468 28x24]@S(S(0)[0,0 1920x1080]) S:1,00 C:1717,480 [60/60 msec]
[debug] CLICK on L(1717,480)@S(0)[0,0 1920x1080]

[debug] Region: exists: waiting 5,0 secs for shop_slide-2.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: shop_slide-2.png (file:/D:/Avto Testing Experiment.sikuli/shop_slide-2.png)

[debug] Region: exists: shop_slide-2.png has appeared at M[1650,464 85x32]@S(S(0)[0,0 1920x1080]) S:0,71 C:1692,480 [972/640 msec]
[debug] Device: Mouse: moved externally: now (1799,441) was (1717,480) (mouseMovedResponse 0)
[debug] CLICK on L(1667,480)@S(0)[0,0 1920x1080]

[debug] Region: find: waiting 3,0 secs for dfsdf.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: dfsdf.png (file:/D:/Avto Testing Experiment.sikuli/dfsdf.png)
[debug] Region: checkLastSeen: still there
[debug] Region: find: dfsdf.png has appeared at M[1494,329 35x29]@S(S(0)[0,0 1920x1080]) S:0,99 C:1511,343 [63/63 msec]
[debug] CLICK on L(1511,343)@S(0)[0,0 1920x1080]

open_shop
[debug] Image: reused: shop_slide-2.png (file:/D:/Avto Testing Experiment.sikuli/shop_slide-2.png)
[debug] Region: exists: waiting 3,0 secs for P(shop_slide-2.png) S: 0.9 to appear in R[0,0 1920x1080]@S(0)
[debug] Region: checkLastSeen: still there
[debug] Region: exists: P(shop_slide-2.png) S: 0.9 has appeared at M[1650,464 85x32]@S(S(0)[0,0 1920x1080]) S:0,71 C:1692,480 [54/54 msec]
[debug] CLICK on L(1667,480)@S(0)[0,0 1920x1080]

[debug] Region: find: waiting 3,0 secs for dfsdf.png to appear in R[0,0 1920x1080]@S(0)
[debug] Image: reused: dfsdf.png (file:/D:/Avto Testing Experiment.sikuli/dfsdf.png)

[debug] Region: checkLastSeen: not there

[debug] Region: find: dfsdf.png has not appeared [1030 msec]
[error] script [ Avto Testing Experiment ] stopped with error in line 18
[error] FindFailed ( can not find dfsdf.png in R[0,0 1920x1080]@S(0) )
[debug] Sikulix: cleanUp: 0

[debug] save image for copy&paste: shop_slide-2.png -> /D:/Avto Testing Experiment.sikuli/shop_slide-2.png
[debug] save image for copy&paste: building.png -> /D:/Avto Testing Experiment.sikuli/building.png
[debug] save image for copy&paste: shop_slide-2.png -> /D:/Avto Testing Experiment.sikuli/shop_slide-2.png
[debug] save image for copy&paste: dfsdf.png -> /D:/Avto Testing Experiment.sikuli/dfsdf.png

[debug] save image for copy&paste: shop_slide-2.png -> /D:/Avto Testing Experiment.sikuli/shop_slide-2.png
[debug] save image for copy&paste: building.png -> /D:/Avto Testing Experiment.sikuli/building.png
[debug] save image for copy&paste: shop_slide-2.png -> /D:/Avto Testing Experiment.sikuli/shop_slide-2.png
[debug] save image for copy&paste: dfsdf.png -> /D:/Avto Testing Experiment.sikuli/dfsdf.png

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