sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49868
[Question #677021]: Click the text on screen in Java
New question #677021 on Sikuli:
https://answers.launchpad.net/sikuli/+question/677021
I have a Maven project in IntelliJ that utilizes sikulix v. 1.1.3.
I can extract the text from a certain region:
Settings.OcrTextSearch = true;
Settings.OcrTextRead = true;
Region r = Region.create(0,0,500,500);
r.text();
But I cannot use findText or existsText in any way - calling these methods results in exceptions:
r.findText("Test"); // FindFailed even though "Test" is a part of what text() returns
The result is the same for findWord() in sikulix v. 1.1.4:
r.findWord("Test"); // Gives the NullPointerException
My task is to check whether some certain text exists on screen and, if so, click it. Whereas I can do the verification by checking whether the returned text (text()) contains some word, I have no idea how to find the location of this word on the screen. Can you please point me in the right direction here? A code snippet for Java would help a lot.
Thank you.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.