Getting Exception in Thread Error During run my Program | Selenium Forum
M
Posted on 03/05/2016
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());

}

M
Replied on 04/05/2016

update Firefox V42.0 to V44.0.
Or
Remove or comment out below code
//driver.manage().window().maximize();


M
Replied on 04/05/2016

Hi,
After removing the command //driver.manage().window().maximize(); its work so please tell me what is the reason behind that ? After removing
this the functionality work.


M
Replied on 04/05/2016

bug in the selenium.