sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29446
Re: [Question #258340]: How to use sikuli operations on ScreenShot Image File (UNLIKE Screen Region)
Question #258340 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/258340
Status: Needs information => Open
deva gave more information on the question:
we use Sikuli v1.0.1
---------------------CODE START----------------------------
import shutil
f = Finder("C:\Users\Admin\Desktop\FullScreenWebpage.png")
img = "iconToFind.png"
f.findAll(img) # find all matches
mm = [] # an empty list
while f.hasNext(): # loop as long there is a first and more matches
print f.hasNext()
mm.append(f.next()) # access next match and add to mm
print f.hasNext() # is False, because f is empty now
f.destroy() # release the memory used by finder
print len(mm) # the number of matches
# we want to use our matches
for m in mm:
print m
--------------------END OF CODE------------------------------
ERROR:
[error] Region(777,10506,109,18) outside any screen - subsequent actions
might not work as expected
Actually i want to capture the image with reference of target image in
the complete web page
Please let me know the equivalent to capture.
I tried the below code to capture. But it capture on current window page
instead of the full wep page.
Could you please review the below code?
import shutil
f = Finder("C:\Users\Admin\Desktop\FullScreenWebpage.png")
img = "iconToFind.png"
f.findAll(img) # find all matches
mm = [] # an empty list
while f.hasNext(): # loop as long there is a first and more matches
print f.hasNext()
mm.append(f.next()) # access next match and add to mm
print f.hasNext() # is False, because f is empty now
f.destroy() # release the memory used by finder
print len(mm) # the number of matches
# we want to use our matches
for m in mm:
print m
m.setH(50)
m.setW(50)
s=capture(m)
shutil.move(s,r"<TargetPath>")
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.