How to click on an element with Java-TestNG?

How to click on an element with Java-TestNG?

Hi Mark- mazay,

You can use the sample syntax below as a reference:

driver.get("https://lambdatest.github.io/sample-todo-app/");
driver.findElement(By.name("li1")).click();
driver.findElement(By.name("li2")).click();