Skip to content

Instantly share code, notes, and snippets.

@murano500k
Created March 31, 2017 11:22
Show Gist options
  • Save murano500k/86971793dab9bf9a5c0f76b55e7c8a55 to your computer and use it in GitHub Desktop.
Save murano500k/86971793dab9bf9a5c0f76b55e7c8a55 to your computer and use it in GitHub Desktop.
public class ExampleUnitTest {
@Test
public void testSelenium() throws IOException {
Element body = Jsoup.connect("http://172.22.89.65/litecart/admin").get().body();
driver.get("http://localhost/litecart/admin/login.php");
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("password")).sendKeys("admin");
for(Element e : driver.findElements(By.className("li"))){
for(Element child : e.findElements(By.className("li"))){
child.click();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment