This is the Feature File
Given User is on Home Page
When User Navigate to LogIn Page
And User enters Credentials to LogIn
| Username | Password |
| testuser_1 | Test@153 |
| testuser_2 | Test@154 |
Then Message displayed Login Successfully
This is the Step Defination File
@When("^User enters Credentials to LogIn$")
public void user_enters_testuser_and_Test(List<Credentials> usercredentials) throws Throwable {
//Write the code to handle Data Table
for (Credentials credentials : usercredentials) {
driver.findElement(By.id("log")).sendKeys(credentials.getUsername());
driver.findElement(By.id("pwd")).sendKeys(credentials.getPassword());
driver.findElement(By.id("login")).click();
}
}
Query : Can you make me understand the internal working of this code ?