java.lang.ClassCastException: com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement

htmlunit | sirstrahd | 4 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    ClassCast exception loading page

    htmlunit | 4 months ago | sirstrahd
    java.lang.ClassCastException: com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement

      at com.gargoylesoftware.htmlunit.html.HtmlPage.getDocumentElement()
    2. HtmlUnit
      WebClient.close
      1. com.gargoylesoftware.htmlunit.html.HtmlPage.getDocumentElement(HtmlPage.java:328)
      2. com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1187)
      3. com.gargoylesoftware.htmlunit.html.HtmlPage.cleanUp(HtmlPage.java:308)
      4. com.gargoylesoftware.htmlunit.WebWindowImpl.removeChildWindow(WebWindowImpl.java:225)
      5. com.gargoylesoftware.htmlunit.WebWindowImpl.destroyChildren(WebWindowImpl.java:207)
      6. com.gargoylesoftware.htmlunit.TopLevelWindow.close(TopLevelWindow.java:126)
      7. com.gargoylesoftware.htmlunit.WebClient.close(WebClient.java:1799)
      7 frames
    3. com.iccenter.integrationtest
      HtmlUnitRunner.browser_getPage
      1. com.iccenter.integrationtest.tools.HtmlUnitRunner.browser_getPage(HtmlUnitRunner.java:22)
      1 frame