title: How to select options in five list boxes without repetiton of code(Web element- list box)?
body: <p>There are 5 list boxes in which i have selected 1 options each:</p>
  
  <pre><code>WebElement listBox=driver.findElement(By.id("country"));//click on country text box
  Select select1=new Select(listBox);
  select1.selectByVisibleText("India");//select india
  
  WebElement listBox1=driver.findElement(By.id("state"));//click on state text box
  Select select2=new Select(listBox1);
  select2.selectByVisibleText("delhi");//select delhi
  
  WebElement listBox2=driver.findElement(By.id("district"));//click on district text box
  Select select3=new Select(listBox2);
  select3.selectByVisibleText("NCR");//select NCR
  
  WebElement listBox3=driver.findElement(By.id("block"));//click on block 
  Select select4=new Select(listBox3);  
  select4.selectByVisibleText("Block1");//select Block1
  
  WebElement listBox4=driver.findElement(By.id("village"));//click on village text box
  Select select5=new Select(listBox4);        
  select5.selectByVisibleText("south");//select south
  </code></pre>
  
  <p>the above code is too long
  but i have to reduce code length by combining the code for list boxes.</p>