I need to feed my test with testdata from a .csv file and therefore I need to parameterize my test. How is that done in Selenium?
Here is the code:
element.sendKeys("30097429029");
I want the numbers to be parameterized.
I need to feed my test with testdata from a .csv file and therefore I need to parameterize my test. How is that done in Selenium?
Here is the code:
element.sendKeys("30097429029");
I want the numbers to be parameterized.
This is not Selenium related, you could use some lib for .csv handling (or something like this https://www.mkyong.com/java/how-to-read-and-parse-csv-file-in-java/) and than pass this data to your methods. Not sure what is exactly a problem, what are you trying to accomplish?
Data from csv can be passed using Dataproviders. A Data Provider is a method annotated with @DataProvider. A Data Provider returns an array of objects. More detailed answer you can find How to pass parameter to data provider in testng from csv file