← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #252703]: Trying to typed text in one image but it is typing in some different image.

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
sorry, had a short break ;-)

--- filenames with a dot:
though it seems to work as image filenames, it might lead to strange behavior, since SikuliX still contains much "old" code.
So I recommend to not use dots in filenames.

in your case it is simply not necessary, since ./images/some.png is the
same as images/some.png

--- if I understand you right:
before the type() is used, you are trying to give focus to a specific input field by clicking on some image.

If yes: your image is not unique enough, so there exist other possible
matches on the screen.

Best practices:
- captured images should have as little as possible surrounding background
- use Pattern().similar() to raise the threshold for the needed similarity score
- restrict the region, where you expect the target image to appear and use region.function() instead of screen.function()

when programming in Java it is helpful, to have the SikuliIDE in
parallel, to capture images and test them with the IDE's preview feature
(until SikuliX ImageSupport is available as standalone feature).

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