I'm trying to catch an InvalidStateException (and only this exception!) but my code is throwing out an ElementNotVisibleException and it is still being caught. I know that this is the problem because I did this:
try{
thrown new ElementNotVisibleException("why???");
}
catch(InvalidElementStateException e){
System.out.println("Welp, this sucks.");
}
And, welp, this sucks.
Selenium javadocs doesn't list ElementNotVisibleException as a subclass of InvalidElementState Exception, yet Java seems to think that this is the case. Can anyone enlighten me/suggest a workaround? Thanks!
Oh, and I'm using Java 7, Selenium 2.46.