← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #674435]: Drawing on the map doesnt work in Windows 7

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- screen.saveScreenCapture()
... captures the screen content and saves it to the given path as a timestamped PNG file
... the BufferedImage (ScreenImage) from the capture is stored in-memory with the screen object
... it returns the absolute path to the image file

Please check wether this happens.

--- screen.getLastScreenImage()
returns the BufferedImage (ScreenImage), that is stored with the screen object at the time of the last capture

in your case the content that is used with the Pattern() should be the
same as that with the screen.saveScreenCapture before, since no new
capture could have changed the stored ScreenImage.

Then you do a click with Selenium, which surely changes the screen
content.

with the following screen.click(p) you search a former screen content in
a current screen content, that has changed and is not found of course.

Even if it would have been found, all this would have benn the same as
simply clicking the center of the screen.

Since I have no idea, what you want to achieve, I can only say: revise
your workflow

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