bharathramesh / windowlicker

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

ElementProbe broken with new version of webdriver #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Newer versions of webdriver (like 1039) seems to not only throw 
NoSuchElementException but StaleElementReferenceException as well. 

A simple fix is to catch StaleElementReferenceException as well in the 
ElementProbe loop:

 public void probe() {
        foundElement = null;
        try {
            foundElement = driver.findElement();
            probe(foundElement);
        }
        catch (NoSuchElementException e) {
            // try next time
        } catch (StaleElementReferenceException e){
            // try next time
        }
    }

Greetings
Hopalong and Seb

Original issue reported on code.google.com by red...@gmail.com on 24 Aug 2009 at 12:52

GoogleCodeExporter commented 8 years ago

Original comment by nat.pr...@gmail.com on 1 Oct 2009 at 9:41

GoogleCodeExporter commented 8 years ago

Original comment by nat.pr...@gmail.com on 1 Oct 2009 at 9:41

GoogleCodeExporter commented 8 years ago
Gah! Bloody unchecked exceptions!

Thanks.  I've committed a fix.

Original comment by nat.pr...@gmail.com on 5 Oct 2009 at 3:35

GoogleCodeExporter commented 8 years ago

Original comment by nat.pr...@gmail.com on 5 Oct 2009 at 3:35