import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class Kesineni {
WebDriver driver;
public void test() throws InterruptedException {
//launch the firefox browser
driver=new FirefoxDriver();
//enter URL Kesinenitravels application
driver.get("http://www.kesinenitravels.com");
//Select source
new Select(driver.findElement(By.id("ctl00_cpEndUserMain_ucSearchRoute_ddlSource"))).selectByVisibleText("CHENNAI");
Thread.sleep(4000);
//Select Destination
new Select(driver.findElement(By.id("ctl00_cpEndUserMain_ucSearchRoute_ddlDestination"))).selectByVisibleText("HYDERABAD");
Thread.sleep(4000);
//Click on Search button
driver.findElement(By.id("ctl00_cpEndUserMain_ucSearchRoute_ibtnSearch")).click();
Thread.sleep(7000);
//Get the text of ServiceNo's
List ele=driver.findElements(By.xpath("//table[@id='ctl00_cpEndUserMain_ucOnwardJourney_gvServices']/tbody/tr/td[2]"));
System.out.println(ele.size());
//print text
//Create one list
List one = new ArrayList();
for(int i=0;i ele1=driver.findElements(By.xpath("//table[@id='ctl00_cpEndUserMain_grdvCheckFare']/tbody/tr/td[2]"));
List two = new ArrayList();
for(int i=0;i