简体   繁体   English

在弹出窗口中无法识别的图像(Sikuli)

[英]Images not recognized inside of a popup window (Sikuli)

I've wrote a java program using Sikuli which navigates through numerous pages of a flash application. 我已经使用Sikuli编写了一个Java程序,该程序可在Flash应用程序的众多页面中导航。 Everything seems to work up until I get to a popup window, and then it's unable to recognize images in the window. 在进入弹出窗口之前,一切似乎都可以正常工作,然后它无法识别窗口中的图像。

I've tried recapturing the images, and the Sikuli IDE recognizes them when I do an image compare on the current screen. 我尝试重新捕获图像,并且在我在当前屏幕上进行图像比较时,Sikuli IDE会识别出它们。 Which leads me to believe that it's not related to similarity being too high. 这使我相信,这与相似度过高无关。

Any possible ideas or solutions would be helpful. 任何可能的想法或解决方案都将有所帮助。

Thanks, 谢谢,

Additional information: 附加信息:

if (screen.exists(continue_overview_img.similar(similarity),timeout) != null) {
screen.wait(2.0);
screen.click(continue_overview_img);
}

[error] Region.exists: seems that imagefile could not be found on disk [错误] Region.exists:似乎在磁盘上找不到映像文件

Do you mean you are not able to match images within the popup? 您是说您无法在弹出窗口中匹配图像吗? If so, have you tried leveraging similarity threshold? 如果是这样,您是否尝试过利用相似性阈值? Check this doc . 检查此文档

After seeing the error message the problem seems to be the image you check cannot be found by the script you run. 看到错误消息后,问题似乎是您运行的脚本无法找到您检查的图像。 Make sure the path you provide for the image is on your classpath. 确保为图像提供的路径在类路径上。

In order to verify that try using absolute path. 为了验证尝试使用绝对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM