I have test case to pass the value in input fields (2 fields) then click the submit button. I have test data file in which multiple values are stored and I want to run the test case multiple time based on data in text file and pass the different value in input field which is stored in text file.
@Test
public void dosomework()
{
driver.findElement(By.id("field1")).sendKeys(AccountName);
driver.findElement(By.id("field2")).sendKeys(AccountName);
}
Text file
a1,b1
a2,b2
a3,b3
As per above file test case should run 3 times with these values. How can I achieve this?