how to login with multiple credential using excel utility using poi

i want to ask how to read multiple row in excel using poi. Because i try to pass multiple username and password from excel like
test case name   username    password            browser                 result
tc1                                   abc             abc                             chrome                   pass
tc2                                  xyz              xyz                             mozila                       pass
tc3                             empty              xyz                      ie                pass
something like this
pls sir help
thanks you so much

Default Asked on September 1, 2016 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    1. Use the “ExcelUtils” class given in the selenium tutorial

    2.
    for(row=1;row<totalRows;++row){
    System.out.println(“Row Num : ” + row);
    for(col=0;col<totalColumns;++col){

    fieldName = ExcelUtils.getCellData(0, col);
    data = ExcelUtils.getCellData(row, col) ;
    System.out.println(fieldName + ” – ”  + data);
    }}

    Train Answered on September 13, 2016.
    Add Comment

    Are you familiar with How to Generate Customized Excel Reports Using TestNG in Selenium?  If not,
    I recommend this for you: http://blog.testproject.io/2016/04/17/excel-reports-using-testng/

    Train Answered on October 13, 2016.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.