X-1.0rc2: Find("Text with space") fails

Asked by Beth Griffin

Sikuli X 1.0rc2, Windows, Netbeans IDE 6.9.1 with builtin Jython 2.5.1

I don't know if this is related to Bug #710586 or not.

I am implementing code that does the following:

1. click on an image which is a menu bar menu title
2. create a region below the image that contains the menu
3. region.find("Reset Window Layout")

This find always seems to fail, but if I just do region.find("Reset"), it works. I'm seeing the same for other strings with spaces in them.

As long as I can pick a unique word for the menu item I want to find, this workaround is fine, but is there something else I should be doing?

Thanks,
Beth

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--1: yes, this is due to the still experimental OCR implementation: neither reliable nor robust

--2: alternatives:

- If it is menu navigation: In these situations I always use calculated offsets or (if possible) navigation keys.

- If processing time does not matter, try this: just read the text from the region (Region.text()) and compare it (sthg. like soundex or some other fuzzy compare) with your expected text.

--3. hope for the future :-)
As far as I know: they plan to have a really enhanced text find/OCR with rc3.

Revision history for this message
Beth Griffin (beth-griffin) said :
#2

Thanks RaiMan, that solved my question.