Sikuli - switching monitor and resolution invalidate the scripts

北城以北 提交于 2019-12-23 14:59:59

问题


I do switch often between my laptop screen and my external 24 inch monitor, and I did notice that if I take snapshots on my laptop, then if I run the script while connected to the 24 inch monitor, the test does not work correctly anymore. Same if I go the other way around, taking snapshots from the 24 inch monitor, and then run the test on the laptop monitor.

I believe this is due to the different resolution of the image; is there a way to be "resolution independent" while running Sikuli ? I did consider taking snapshots at different resolution and place everything in a list, then parse the list one element at time, until I find a match; but I hope there is a more efficient way.


回答1:


There are few thing you can try (more details here):

  1. Switch ClearType off (only for Windows)
  2. Reduce similarity score
  3. Turn off "Smooth screen fonts edges" (only for Windows)

If the above not helpful then not much can be done in terms of configuration. The only robust solution is to maintain multiple sets of patterns, specific to each system.



来源:https://stackoverflow.com/questions/44537136/sikuli-switching-monitor-and-resolution-invalidate-the-scripts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!