How to click on an element with Java-TestNG using Java-Cucumber?

How to click on an element with Java-TestNG using Java-Cucumber?

Hello Joe- elmoufak,

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();