App.focus() on Windows not working with unicode characters in window title --- fixed 2019-03-05 build#220
See original GitHub issueBug status currently only workaround — fix will take time (bug tracking)
App("someApp.exe").focus() will not work, if the title of the
frontmost app window contains unicode characters.
workaround:
App.focus("part of window title") will only work
if the given string is ascii-only (no unicode characters),
but it will find and focus also windows, whose title contains Unicode characters.
So currently there is no way to focus apps/windows, whose window titles are completely unicode.
Hi I’ve just started to use Sikulix for my task. I have tested sikulix 1.1.4 2018-11-27_13:43 (Build 137) on Windows 10. When I tried to focus on app named with Unicode character, it failed with error “App.focus failed: no window for App_name_including_unicode_characters_and_English_also_PID” I’ve reviewed Sikulix code and realised that switchApp method in org/sikuli/natives/WinUtil.java line 332 not implemented. Probably because of this, focus() is not working? Sorry I’m not actively using Java but Python. Could you please fix this when you have time? Also, is there any better way to work around to set focus on the app easily? I assume it can be done with fidn images but except this 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (10 by maintainers)
Top GitHub Comments
focus() always returns the App instance, but does not guarantee that it worked (currently no reliable check internally).
so this does not really make sense:
To get all available info about an App instance, simply use
App has a rather verbose toString() implementation.
confirmed: does not work, if window title contains unicode character.
possible workaround: use a compound part of the window title, that does not contain any unicode characters.