ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

webElement.isDisplayed() throws an invalid exception. #1047

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Selenium version: 2.44.0
OS: Windows 7
Browser: Chrome
Browser version: 40.0.2214.115
chromedriver: 2.12.301325

It only occurs on this page 
http://www.washingtonpost.com/world/afghanistan-avalanche/2015/02/26/74dd15e2-bd
c1-11e4-bdfa-b8e8f594e6ee_gallery.html and other gallery pages in terms of this 
site. And only in chrome. 
This doesn'y happen in 100% cases. But appr. every third/fourth run fails.

Here is the simple snippet to catch this issue.

List<WebElement> allNodesList = 
TestSession.getWebdriver().findElements(By.cssSelector("*"));
for (WebElement node : allNodesList) {
    try {
            if (node.isDisplayed())
                //Do something             
    } catch (StaleElementReferenceException e) {
        logger.warn(e.getMessage());
    }

the exception occurs on the line: node.isDisplayed()

org.openqa.selenium.WebDriverException: unknown error: Runtime.evaluate threw 
exception: Error: Error: An invalid exception was thrown.

Original issue reported on code.google.com by evgeny.m...@gmail.com on 3 Mar 2015 at 12:31

GoogleCodeExporter commented 9 years ago
I am not able to reproduce the problem.
Tried your test code on the versions 1) mentioned by you as well as 2) on 
latest versions of selenium 2.45, chrome browser 41 and chrome driver 2.14
Can you please try with latest version and let us know if you see the issue

Original comment by gmanikp...@chromium.org on 17 Mar 2015 at 7:12

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 30 Mar 2015 at 9:42

GoogleCodeExporter commented 9 years ago
I'm not sure whether the new version helped or I presented too oversimplified 
code with something important ommited but I'm not able to reproduce the problem 
neither with this snippet nor in any of real tests.

Original comment by evgeny.m...@gmail.com on 1 Apr 2015 at 12:44