Hi Please help me, During running my program it display "[b:1bb6uqd5]Exception in thread "main" org.openqa.selenium.WebDriverException: this.getChromeWindowFromDocumentWindow(...) is undefined[/b:1bb6uqd5]" Error... Below is my Code and please look into the attached sheet ...
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 TestLinks {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://msn.com");
List<WebElement> alllinks = driver.findElements(By.tagName("a"));
// FOR PRINT ALL LINKS ON THE PAGE
//System.out.print("All links on Page are" + alllinks.size());
//FOR PRINT THE TEXT OF ALL LINKG
for (int i =0;i<alllinks.size();i++)
{
System.out.println("Text of all links are -----> " + alllinks.get(i).getText() + "Links which are not display "
+ alllinks.get(i).isDisplayed());
}