New question #676155 on Sikuli:
https://answers.launchpad.net/sikuli/+question/676155

I am trying to automate an action where I open a drop-down menu and then click 
on one of the items from the menu. This is a Java application using Swing, on 
Java 8, and Windows 10.

Opening the menu works fine, but recognizing the item on the menu seems to 
change from run to run. I don't know if Windows is doing some font scaling or 
smoothing, but the png and what I see on the screen look pretty close, to my 
eye, but apparently not to Sikuli.

I've tried both click and a hover + click. 

I wanted to try OCR instead, to see if that was any more resilient to whatever 
else might be changing between runs, but I am having trouble finding examples 
of that. 

I have added:
Settings.OcrTextRead = true; 
Settings.OcrTextSearch = true;

but when I try:
Region menuItem = appWindow.exists("Open Notebook", 0);

I get:
[error] Region: handleImageMissing: Response.ABORT: aborting
[error] Region: Did you want to find text? If yes, use text methods (see docs).
Exception in thread "main" java.lang.RuntimeException: Exists: 
Abort:ImageMissing: Open Notebook
        at org.sikuli.script.RunTime.abortScripting(RunTime.java:1107)
        at org.sikuli.script.Region.exists(Region.java:2372)
        at com.illumon.guitest.TestIrisGui.main(TestIrisGui.java:139)


Thanks for the help,
Paul


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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to