"Karmanyevadhikaraste ma phaleshu kadachana, Ma karma phala hetur bhurmatey sangostva akarmani."

Retrive elements from Web Table

//when there is only one td or row value changing split the xpath into 2 and use for loop and get the values of the web table elements

String xpath_start="mnnn";
String xpath_end="hjjhjh";

for(int i=3;i<+33;i=i+2){
String x= driver.findElement(By.xpath(xpath_start+ i + xpath_end)).getText();
System.out.println(x);



Caleneder::

driver.get("http://www.spicejet.com");
driver.findElement(By.xpath("//*[@id='flightSearchContainer']/div[4]/button")).click();
driver.findElement(By.xpath("//*[@id='ui-datepicker-div']/div[1]/table/tbody/tr[3]/td[4]/a")).click();

//AJAX

//want to read all the values displayed when we type a letter in google search
Take the xpath of the first element displayed, observe the xpaths of all elements displayed
take xpath of textbox and send the keys(word)

then from the xpath of 1 st element, driver.findelement(by(xpatha).getText();

WebDriver driver= new FirefoxDriver();

driver.get("http://www.google.com");
driver.findElement(By.xpath("//*[@id='gs_tti0']")).sendKeys("b");
/* try{
int i=1;
while(true)
{
String val= driver.findElement(By.xpath("//*[@id='gsr']/table/tbody/tr[1]/td[2]/table/tbody/tr["+i+"]/td/div/table/tbody/tr/td[1]/span/b")).getText();// the first element displayed
System.out.println(val);
i++;
}


}catch(Exception e){
}}*/
}