Export to GitHub

windowlicker - issue #3

ElementProbe broken with new version of webdriver


Posted on Aug 24, 2009 by Grumpy Horse

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

Comment #1

Posted on Oct 1, 2009 by Quick Hippo

(No comment was entered for this change.)

Comment #2

Posted on Oct 1, 2009 by Quick Hippo

(No comment was entered for this change.)

Comment #3

Posted on Oct 5, 2009 by Quick Hippo

Gah! Bloody unchecked exceptions!

Thanks. I've committed a fix.

Comment #4

Posted on Oct 5, 2009 by Quick Hippo

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium