简体   繁体   English

如何在Sikuli-IDE中保留图像路径?

[英]How to preserve image path in Sikuli-IDE?

I want to group my screenshots by their functional areas. 我想按功能区域对屏幕截图进行分组。 In my BundlePath, I create folders of each of the functional areas and put screenshots in there. 在我的BundlePath中,我创建了每个功能区域的文件夹,并在其中放置了屏幕截图。

For example: wait("student_nav/my_studies_tab.png") 例如:wait(“ student_nav / my_studies_tab.png”)

I can save that and it runs just fine. 我可以保存它,并且运行正常。

However, if I close and restart the IDE, the path to the image gets lost and only the filename remains. 但是,如果我关闭并重新启动IDE,则映像的路径将丢失,仅保留文件名。

That is: wait("my_studies_tab.png") 那就是:wait(“ my_studies_tab.png”)

Even stranger, the .py files associated with the bundle retains the path until I close down the IDE for a second time. 甚至更奇怪的是,与捆绑软件关联的.py文件会保留路径,直到我再次关闭IDE为止。 Then all of the paths are lost in the .py file as well. 然后,所有路径也会在.py文件中丢失。

Am I doing it wrong? 我做错了吗?

我没有尝试过,但是作为一种解决方法,您可以将图像路径存储在变量中并将其传递给任何函数

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

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