java.lang.IllegalArgumentException: Can't move focus to an element from a different page.

htmlunit | csp-a0zvq5m | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Wrong activeElement for iFrames and their parents

    htmlunit | 2 years ago | csp-a0zvq5m
    java.lang.IllegalArgumentException: Can't move focus to an element from a different page.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Can't move focus to an element from a different page.

      at com.gargoylesoftware.htmlunit.html.HtmlPage.setFocusedElement()
    2. HtmlUnit
      HtmlElement.click
      1. com.gargoylesoftware.htmlunit.html.HtmlPage.setFocusedElement(HtmlPage.java:2047)
      2. com.gargoylesoftware.htmlunit.WebClient.setCurrentWindow(WebClient.java:743)
      3. com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1238)
      4. com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1216)
      4 frames