在Windows Server 2019(ADO VM)上获取Sikuli中的Findfailed问题

发布于 2025-02-12 04:21:16 字数 1823 浏览 0 评论 0原文

通过管道在Window Server 2019(ADO VM)上运行脚本时,请在Windows 10(ADO VM)上运行脚本时,在Windows 10(分辨率为1920x1080)上可以正常工作。

我正在使用屏幕分辨率实用程序将VM分辨率更改为管道中的1920x1080。 我通过使用以下文本设置路径束文件夹:

imagepath.setBundleFolder(new File(System.getProperty)(“ user.dir”)+“/sikuliimages”));

使用以下代码

ImagePath.setBundleFolder(new File(System.GetProperty)(“ user.dir”)+“/sikuliimages”)); system.out.println(“图像束路径=”+imagePath.getBundlePath());

           Screen screen=new Screen();
           String UserName_Image_Path = System.getProperty("user.dir")+"/SikuliImages/UserName_TextBox.png";
           String UserPassword_Image_Path = System.getProperty("user.dir")+"/SikuliImages/UserPassword_TextBox.png";
           String SignIn_Image_Path = System.getProperty("user.dir")+"/SikuliImages/SignIn_Button.png";
           
           Pattern  P_UserName = new Pattern(UserName_Image_Path);
           Pattern  P_UserPassword = new Pattern(UserPassword_Image_Path);
           Pattern  P_SignIn = new Pattern(SignIn_Image_Path);
                        
           System.out.println("Wait for popup");
         

            screen.wait(P_UserName,30);
            Match UserName_Found = screen.exists(UserName_Image_Path);                      
            UserName_Found.highlight(2);
            screen.type(P_UserName,UserName);
            Match UserPassword_Found = screen.exists(UserPassword_Image_Path);  
            UserPassword_Found.highlight(2);
            screen.type(P_UserPassword,UserPassword);
            Match SignIn_Found = screen.exists(SignIn_Image_Path);  
            SignIn_Found.highlight(2);
            screen.click(P_SignIn);

findfailed:c:\ agent \ vsts-agent-win-x64-2.200.2_work \ 1 \ s \ s \ automation/sikuliimages/username_textbox.png:(378x54) 第2226行,在文件区域中

Getting below error when running script on window server 2019 (ADO VM) through pipeline , same script is working fine on windows 10 (having resolution 1920X1080).

I am using screen resolution utility to change the VM resolution to 1920X1080 in pipeline.
I am setup the path Bundle Folder by using below text:

ImagePath.setBundleFolder(new File(System.getProperty("user.dir")+"/SikuliImages"));

using below code

ImagePath.setBundleFolder(new File(System.getProperty("user.dir")+"/SikuliImages"));
System.out.println("Image Bundle Path="+ImagePath.getBundlePath());

           Screen screen=new Screen();
           String UserName_Image_Path = System.getProperty("user.dir")+"/SikuliImages/UserName_TextBox.png";
           String UserPassword_Image_Path = System.getProperty("user.dir")+"/SikuliImages/UserPassword_TextBox.png";
           String SignIn_Image_Path = System.getProperty("user.dir")+"/SikuliImages/SignIn_Button.png";
           
           Pattern  P_UserName = new Pattern(UserName_Image_Path);
           Pattern  P_UserPassword = new Pattern(UserPassword_Image_Path);
           Pattern  P_SignIn = new Pattern(SignIn_Image_Path);
                        
           System.out.println("Wait for popup");
         

            screen.wait(P_UserName,30);
            Match UserName_Found = screen.exists(UserName_Image_Path);                      
            UserName_Found.highlight(2);
            screen.type(P_UserName,UserName);
            Match UserPassword_Found = screen.exists(UserPassword_Image_Path);  
            UserPassword_Found.highlight(2);
            screen.type(P_UserPassword,UserPassword);
            Match SignIn_Found = screen.exists(SignIn_Image_Path);  
            SignIn_Found.highlight(2);
            screen.click(P_SignIn);

FindFailed : C:\agent\vsts-agent-win-x64-2.200.2_work\1\s\Automation/SikuliImages/UserName_TextBox.png: (378x54) in R[0,0 1920x1080]@S(0)
Line 2226, in file Region.java

Could someone help me please.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔嚣张 2025-02-19 04:21:16

这不是有效的Windows路径,因为它同时包含\和 /

This is not valid windows path since it contains both \ and /

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文