Ex. @DataProvider(name = "Authentication")
public static Object[][] credentials() {
// The number of times data is repeated, test will be executed the same no. of times
// Here it will execute two times
return new Object[][] { { "testuser_1", "Test@123" }, { "testuser_1", "Test@123" }};
}
// Here we are calling the Data Provider object with its Name
@Test(dataProvider = "Authentication")
public void test(String sUsername, String sPassword) {
driver = new FirefoxDriver();
driver.get("
http://www.store.demoqa.com");
driver.findElement(By.id("log")).sendKeys(sUsername);
driver.findElement(By.id("pwd")).sendKeys(sPassword);
}