← Back to team overview

sikuli-driver team mailing list archive

[Question #676000]: masked part is not ignored

 

New question #676000 on Sikuli:
https://answers.launchpad.net/sikuli/+question/676000

I try to test if the mask() function will block the masked region in sikulix 1.1.4. 
What I do is to put a picture in powerpoint and place a black box blocking its center area. Then create a mask pattern with a snapshot of its current look.  Then I move the black box away from the picture. Now the center of the image is exposed.  After that, I run the code to ask if sikulix can find the element in the center of the image.  and sikulix still can. Why?? Would its center suppose to be ignored? 

code:
reg=Pattern("1541610697055.png").mask()

r1 = find(reg).highlight(1,"green")
if exists(reg):
    print("the pattern found1")
else: print("pattern not found")
if r1.exists("1541610784910.png"):
    print("snipping tool found1")
    click(r2)
else:  print("snipping tool not found1")

Message: 
[log] highlight M[213,358 282x294]On(0) S 10000 for 1.0 secs color: green

the pattern found1
snipping tool found1

[log] CLICK on L(358,503)@S(0)[0,0 1440x900] (527 msec)

Thanks!

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