sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #45108
Re: [Question #662004]: Getting error Region.text: text recognition is currently switched off
Question #662004 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/662004
Status: Open => Answered
RaiMan proposed the following answer:
put it before you touch any SikuliX feature in your code
for example:
public static void main(String[] args) throws FindFailed, InterruptedException {
Settings.OcrTextRead=true;
Screen screen = new Screen();
Thread.sleep(5000);
Region r = screen.find("C:\\Users\\KHANDELA1\\Pictures\\AssetName_excel.PNG").below(20);
screen.hover(r);
String read = r.text();
System.out.println("read"+read);
Be aware: the text feature has many problems and might not deliver what
you expect.
Better use a library, that allows, to read XLS files directly
(https://www.mkyong.com/java/apache-poi-reading-and-writing-excel-file-
in-java/)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.