Created
February 24, 2016 02:43
-
-
Save Vanilton18/084418ee779e7bd58c14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.vanilton.test; | |
import java.io.IOException; | |
import javax.swing.JOptionPane; | |
import org.sikuli.script.FindFailed; | |
import org.sikuli.script.Screen; | |
public class HelloWorldSikuliXIDE { | |
static Screen screen = new Screen(); | |
public static void main(String[] args) throws FindFailed, IOException { | |
// Comente o Runtime para o app não ser aberto | |
Runtime.getRuntime().exec("java -jar examples-sikuli.jar"); | |
if (screen.exists("src//test//resources//pictures//main.png") != null) { | |
JOptionPane.showMessageDialog(null, "Uhuu! Encontrei o app aberto!", null, 1); | |
} else { | |
JOptionPane.showMessageDialog(null, "Oops! Não encontrei o app aberto", null, 1); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment