title: How to read multiple Username and password from excel using selenium
body: <pre><code>public static void main(String args[]) throws IOException, JXLException, BiffException, FileNotFoundException, InterruptedException { 
  
      System.setProperty("webdriver.chrome.driver","C:\\Users\\yirsh\\Desktop\\Selenium\\chromedriver_win32\\chromedriver.exe");
      WebDriver driver = new ChromeDriver();
  
      Sheet s;
  
      FileInputStream fi = new FileInputStream("C:\\Users\\yirsh\\Desktop\\UAT WEBSHOP.xls");
      Workbook w = Workbook.getWorkbook(fi);
      s = w.getSheet(1);
      int z = s.getRows();
      System.out.println("no of Users:"+z);
      driver.get("http://...@...ip.../path/");
      driver.manage().window().maximize();
      //Thread.sleep(10000);
      for(int row = 1; row &lt; 6; row++)
      {
          String username = s.getCell(2, 1).getContents();
          System.out.println("Username: "+username);
          driver.findElement(By.id("j_username_leftAside")).sendKeys(username);
  
          String password = s.getCell(3, 1).getContents();
          System.out.println("Password: "+password);
          driver.findElement(By.id("j_password_leftAside")).sendKeys(password);
  
          driver.findElement(By.xpath("/html[@class=' js opacity generatedcontent pointerevents']/body[@class='page-homepage pageType-ContentPage template-pages-layout-RexelHomePageLayout pageLabel-homepage language-de ']/div[@id='page']/div[@id='content']/div[@id='content']/div[@class='content-top-inner']/div[@id='content-inner']/div[@class='mid-wrapper'][1]/div[@class='yCmsContentSlot']/div[@class='login clear']/form[@id='loginForm']/div[@class='left sign-in']/button[@class='Sign-in rx-btn mb0']")).click();
  
          if(driver.getPageSource().contains("Willkommen"))
          {
              System.out.println("Login Sucessfull");     
          }
          else
          {
              System.out.println("Login Failed");
          }
  
          driver.quit();
      }
  }
  </code></pre>
  
  <p>I have more than 10 user credentials but the code reads only one user credentials and exits please correct the code as per my need.As i am new for coding little bit confused of the <code>(int row = 1; row &lt; 6; row++)</code> correct me the exact code</p>