Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:25:18+00:00 2026-06-12T01:25:18+00:00

Using HtmlUnit i can get this Image element for a webpage <pre> <a onclick=return

  • 0

Using HtmlUnit i can get this Image element for a webpage

 <pre> <a onclick="return OnSubmitValidateSignUp();return ValidEmail();" id="lnkSave"    tabindex="10" class="create" href="javascript:__doPostBack('lnkSave','')"></a> </pre>

using

     <i> HtmlAnchor button = (HtmlAnchor) currentPage.getByXPath("//* [@id=\"lnkSave\"]").get(0);     
System.out.println(" anchor "+ button.getId());</i>

But when i put button.click(); following error occured.

Sep 28, 2012 6:39:59 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
WARNING: Obsolete content type encountered: 'application/x-javascript'.
Exception in thread "JS executor for com.gargoylesoftware.htmlunit.WebClient@f27a6e" java.lang.OutOfMemoryError: Java heap space
at java.util.Hashtable.put(Hashtable.java:458)
    at java.util.Properties.load0(Properties.java:392)
    at java.util.Properties.load(Properties.java:341)
    at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:130)
    at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2610)
    at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1436)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1400)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1354)

How can i solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:25:20+00:00Added an answer on June 12, 2026 at 1:25 am

    this is a javascript issue. It seems you have some javascript attached to the OnClick event of the button. First try is to disable JS, if possible. Second try take a look at this answer: HtmlUnit is throwing Out Of Memory and maybe leaking memory, it might help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to select following image button. How can I do that using HtmlUnit?
How can I access this element: <input type=submit value=Save as XML onclick=some code goes
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
I’m submitting a form using java HtmlUnit package. I am able to get pages
I'm having this weird problem with HtmlUnit in Java. I am using it to
I'm trying to clcik a button on a website using HTMLUNIT i followed this
I'm using HtmlUnit in Java to navigate to a web page. From that webpage
I can not change the text in textarea using WebClient/HtmlUnit/Java. I tried to google
I'm using htmlunit to test some pages and I'd like to know how can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.