简体   繁体   English

Sikuli-硒-Java

[英]Sikuli - Selenium -Java

Background: I have my sikuli-integrated selenium script on a Windows machine, and my test cases are running on a Mac (iPad Simulator). 背景:我在Windows机器上安装了sikuli集成的selenium脚本,并且我的测试用例在Mac(iPad模拟器)上运行。 This Mac also has an appium server running on port 4723. 这台Mac也有一个运行在端口4723上的appium服务器。

I want to use sikuli to click a button on the iPad Simulator. 我想使用sikuli单击iPad Simulator上的按钮。 But this does not work. 但这是行不通的。

/* Is there a constructor that accepts an IP argument? Like
Screen s1 = new Screen("ip of mac"); ?*/

Screen s = new Screen();  
s.find(System.getProperty("user.dir")+File.seprator+"playbutton.png"); 
s.click(System.getProperty("user.dir")+File.seprator+"playbutton.png");

I think you need to have the .png files available on the target device (ie your ipad). 我认为您需要在目标设备(即ipad)上使用.png文件。 I've done this when running distributed tests over multiple windows pcs by storing the files and having a method to copy files to the local device in my "before" step. 在多个Windows pc上运行分布式测试时,我已经通过存储文件并在“之前”步骤中具有将文件复制到本地设备的方法来做到这一点。

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

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