From: Ahmed A. <asa...@ya...> - 2017-02-15 15:52:47
|
Hi, - You must subscribe to the list before posting.- This is now fixed in SVN. Thanks,Ahmed ----- Forwarded Message ----- From: "htm...@li..." <htm...@li...> Sent: Wednesday, February 15, 2017 3:10 PM Subject: Auto-discard notification ----- Forwarded Message ----- The attached message has been automatically discarded.When I am loading a webpage in selenium html driver, there is Javascript execution error, but there is also this in the error logs java.lang.ClassCastException: com.gargoylesoftware.htmlunit.javascript.host.Window cannot be cast to com.gargoylesoftware.htmlunit.javascript.host.Console at com.gargoylesoftware.htmlunit.javascript.host.Console.error(Console.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)I have checked error method in the Console class/** * This method performs logging to the console at "error" level. * @param cx the JavaScript context * @param thisObj the scriptable * @param args the arguments passed into the method * @param funObj the function */ @JsxFunction public static void error(final Context cx, final Scriptable thisObj, final Object[] args, final Function funObj) { final WebConsole webConsole = ((Console) thisObj).getWebConsole(); final Formatter oldFormatter = webConsole.getFormatter(); webConsole.setFormatter(FORMATTER_); webConsole.error(args); webConsole.setFormatter(oldFormatter); } All Scriptable objects are not subclasses of console, so why is this here ? |