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
Monday, June 17, 2013
Handling web table in Web driver
Best practices for test automation in agile software development
Agile software development is a highly iterative and collaborative approach to software development that emphasizes flexibility and a...
-
Agile software development is a highly iterative and collaborative approach to software development that emphasizes flexibility and a...
-
Test-Driven Development (TDD) is a software development approach that emphasizes writing automated tests before writing the code. The appr...
-
Artificial intelligence (AI) and machine learning (ML) are transforming the field of software testing by enabling faster and more accurate...