1、将图片截图放置项目的目录下
2、项目代码:
public static void main(String[] args) throws FindFailed, InterruptedException {
Screen screen = new Screen();
String imgPath = "E:\\workspace\\study\\ImageIdentifyAutoTest\\image\\web";
screen.doubleClick(imgPath + "\\tubiao.png");
screen.click(imgPath + "\\baidu.png");
Thread.sleep(2000);
screen.paste(imgPath + "\\sousuotiao1.png", "sikuli");
screen.click(imgPath + "\\select1.png");
System.out.println("成功!");
}
3、运行程序。注意:需要在首界面显示能够查询到tubiao.png,运行结果如下视频所示: