-
-
Save sixman9/3553375 to your computer and use it in GitHub Desktop.
Sikuli JUnit Demo Test
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
//Found at http://tux2323.blogspot.co.uk/2011/06/sikuli-gui-test-automation-with-java.html | |
import org.junit.Test; | |
import org.sikuli.script.App; | |
import org.sikuli.script.Screen; | |
public class GoogleDemoTest { | |
@Test | |
public void testGoogleSearch() throws Exception { | |
Screen screen = new Screen(); | |
App app = new App("Firefox 4.app"); | |
app.focus(); | |
screen.click("images/homeButton.png", 0); | |
screen.click("images/homeUrlInput.png",0); | |
screen.type(null, "www.google.com", 0); | |
screen.click("images/goButton.png", 0); | |
screen.click("images/searchInput.png", 0); | |
screen.type(null, "tux2323", 0); | |
screen.click("images/searchButton.png", 0); | |
screen.click("images/tux2323BlogLink.png", 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment