SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

findText() / find("some text") do not work as expected

Open RaiMan opened this issue 5 years ago • 4 comments

from LP bug 1881240

workaround: Try to solve your problem with findWord, findWords, findLine and findLines features

RaiMan avatar Jun 18 '20 08:06 RaiMan

@RaiMan Hi, Professor! Not sure if this is the right place, since the problem I got is more related to a feature rather than a bug. The thing is, as you've mentioned in the documentation here, I downloaded the Simplified Chinese tessdata from tesseract-ocr and changed the default OCR language setting. The readText() function works fine but findText() keeps throwing an exception: exception At this scenario I can still pass English strings to click elements on the interface but doesn't work in Chinese no matter how. Does it mean I can't pass Chinese characters to the interpreter due to coding problem for now? Is there any bypass for me to implement? Thanks in advance!

gpdeepblue avatar Jul 06 '20 02:07 gpdeepblue

@gpdeepblue Thanks for the information.

I will test the revised findText-feature accordingly.

Please try the above mentioned workaround.

RaiMan avatar Jul 10 '20 14:07 RaiMan

findLine works in my environment. findWord work not very well! thank you, RaiMan!

rainmanwy avatar Jun 20 '22 09:06 rainmanwy

以下代码可用无乱码 OCR.globalOptions().language("eng") OCR.globalOptions().language("chi_sim") text2 = u"一" textElement = findText(text2)

ubun222 avatar Oct 14 '23 06:10 ubun222