How to click on an element with Java-JUnit?
Hi Brettm,
To click on an element with Java-JUnit, use the below code snippet:
@Test
public void testSimple() throws Exception {
try {
//Change it to production page
driver.get("https://lambdatest.github.io/sample-todo-app/");
//Let's mark done first two items in the list.
driver.findElement(By.name("li1")).click();
driver.findElement(By.name("li2")).click();