Created
October 3, 2013 16:41
-
-
Save ddavison/6812928 to your computer and use it in GitHub Desktop.
This example shows a very common jUnit Selenium 2 test structure using the project at http://github.com/ddavison/getting-started-with-selenium
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
/** | |
* This tests My Site | |
*/ | |
@Config(url="http://mysite.com", browser=CHROME) | |
public class TestMySite extends AutomationTest { | |
@Test | |
public void testSomething() { | |
click(By.linkText("something")) | |
.validateText(By.cssSelector("input"), "something"); | |
} | |
@Test | |
public void testSomethingElse() { | |
check(By.cssSelector("input[type='checkbox']")) | |
.validateChecked(By.cssSelector("input[type='checkbox']")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment