129130131132133134135136137138139
URL imageURL = Images.OSXDockIcon; Target imageTarget = new ImageTarget(imageURL); ScreenRegion r = s.wait(imageTarget,1000); mouse.drag(r.getCenter()); imageURL = Images.GoogleMicrophoneIcon; imageTarget = new ImageTarget(imageURL);
140141142143144145146147148149
r = s.wait(imageTarget,1000); mouse.drop(r.getCenter()); ScreenLocation c = mouse.getLocation(); mouse.drag(c); mouse.drop(Relative.to(c).left(200).above(50).getScreenLocation()); } }