Solution for mod-17:Excercise no.11 | Selenium Forum
M
Posted on 27/01/2016
Following is my code sir.
Request you to have a look please.
Am not sure if this is what was expected

==========================================
package p1;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class FinanceNews {

public static void main(String[] args) {
// TODO Auto-generated method stub



WebDriver w=new FirefoxDriver();
List <WebElement> box=new ArrayList<WebElement>();
w.get("https://in.finance.yahoo.com/");
w.manage().window().maximize();
w.manage().timeouts().pageLoadTimeout(45, TimeUnit.SECONDS);
WebElement L=w.findElement(By.xpath("//*[@id='mediamosaiclistlpca'] "));
box=L.findElements(By.className("title "));
//System.out.println("size -------"+box.size());

for(int index=0;index<1;index++)
System.out.println("latest_news:"+box.get(index).getText());

}

}