sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11687
Re: [Question #202951]: Locating a text in window
Question #202951 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/202951
Status: Open => Answered
RaiMan proposed the following answer:
Generally Sikuli can find text in a region or the whole screen:
some_region.find("some text")
see the docs for more information.
But the potential of this feature is limited to medium sized most
popular fonts. And all the rules, to make searches robust apply.
If we are talking about text in a standard html web app, the first
choice should be Selenium, which can be combined easily with Sikuli on
the Jython level and the Java level as well.
@ Damon
The idea of creating images from text,that can be searched is charming, but for the sake of performance, this should be done with the normal image features of Java (create an image, use the font to write the text snippet with the appropriate spacing parameters ) and finally use the buffered image to search on the screen/in the region - no intermediate file saving/loading and no external program to call. Many of the standard ImageMagick functions on images can be done on buffered images and grafic contexts directly in Java (and hence in Jython as well). It is even possible, to "learn" the font metrics from an example image of some text with some intelligent micro searches.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.