HtmlUnit 2.8 released

Nearly 6 months after release 2.7, HtmlUnit-2.8 is finally ready.

This release comes later as originally planned as we wanted to avoid as most as possible any side effect of the large internal changes. I’m now quite confident that we have reached a really good status.

Here is an extract of the change log:

  • single thread for background JS execution
  • migration to HttpClient 4
  • initial support for FF3.6 simulation
  • support for SOCKS proxy
  • initial support for Google AppEngine
  • support for large (binary) download

Download: http://sourceforge.net/project/showfiles.php?group_id=47038

The support for Google AppEngine which is based on contributions from Google’s GWT team is exciting as it will open the door to new usage of HtmlUnit.

The number of HtmlUnit users continuously grows and, as the consequence, so does the number of reported issues and feature wishes. We will try to address it in next release.

Advertisements

12 Comments

  1. August 6, 2010 at 7:54 am

    Hi Marc,
    What does “initial support for Google AppEngine” means? Care to give some details?
    Guillaume

    • Marc Guillemot said,

      August 30, 2010 at 10:48 am

      “initial support for Google AppEngine” means that it should work but that we aren’t 100% confident as it is not possible to have unit tests that really reproduce GAE to ensure the high quality that we want to deliver.

  2. Michael Zamir said,

    September 20, 2010 at 7:33 pm

    Hello Marc
    Can you tell shortly what’s the current performance of this last version of HtmlUnit? How many concurrent browsers can we emulate in one single JVM , assuming each browser navigate in html page with javascript?

    Currently, I can see that my main performance issue during load test is the number of threads required for handling the javascript of each page being navigated by each browser.

    Thanks, Michael
    BTW: and kuddos for your blog. In few google clicks, I found your blog with the most interesting answers 🙂

  3. Sri said,

    November 13, 2010 at 8:49 pm

    Dear Marc Guillemot,

    I came across you blog via HTMLUnit website.

    I came across this excellent java based GUI-Less Browser tool.

    Actually I have some doubts.

    Can we use HTMLUnit for testing GWT-based Web applications.?

    Actually I am a beginner for this automated testing.So even my question may look silly. I request you to kindly help me in this regard.

    I think you will be aware of a cloud management tool called Eucalyptus.
    There We have a part called User Registration.
    Just to make clear about my requirement,I am posting you a link .

    Here is the link.

    https://ecc.eucalyptus.com:8443/

    Click on the Apply link

    Actually I have a set up like this in my local system. I wish to test/automate this User Registration part in my local system with ‘n’ no. of Users.

    Normally with HTMLUnit or with any other tool, We can automate ,provided the case, we know the name of the form tag, text field.
    With that only we can set value for these fields and test them.

    But since the User registration part is written in GWT, I am unable to do the traditional automation.

    So can you suggest me some ways, how to achieve this

    Thanks in advance,
    Sri.
    Reply

  4. Marc Guillemot said,

    November 15, 2010 at 10:53 am

    @Sri

    not that HtmlUnit is integrated in GWT but please use HtmlUnit mailing for such questions.

  5. Huy Hang said,

    March 7, 2011 at 8:50 am

    I tried with the new version but can parse this page, it shows java script error
    http://www.oceanschedules.com/schedules/schedule-search.do

    Here are my code:

    WebClient client = new WebClient(BrowserVersion.FIREFOX_3);
    client.setUseInsecureSSL(true);

    client.setRefreshHandler(new WaitingRefreshHandler(1));

    client.setCssEnabled(false);

    client.setThrowExceptionOnFailingStatusCode(false);

    client.setThrowExceptionOnScriptError(false);

    client.setRefreshHandler(new CustomRefreshHandler());

    client.setTimeout(30000);

    client.setJavaScriptEnabled(true);

    client.setAjaxController(new NicelyResynchronizingAjaxController());

    HtmlPage page = client.getPage(“http://www.oceanschedules.com/schedules/schedule-search.do”);

    System.out.println(page.asXml());

    • Marc Guillemot said,

      March 7, 2011 at 10:55 am

      This is a question for HtmlUnit’s mailing list, not for my blog.

  6. Huy Hang said,

    March 7, 2011 at 10:59 am

    Yeah, I meant HtmlUnit does not work properly for this page, I can develop a page so HtmlUnit can not scrap my data. This is the main thing I wanted to concern.

  7. Lanqu said,

    May 25, 2011 at 1:39 pm

    Hi Marc! Great thanks for html unit support. But I mentioned, that when I’m trying to get Xml page with text/html content type, then html unit give back strange html page with origin xml inserted into the body tag. Is it a new feature or bug?

    • Marc Guillemot said,

      May 30, 2011 at 9:04 am

      This is a question for HtmlUnit’s mailing list, not for my blog.

  8. Dill said,

    December 6, 2011 at 10:29 pm

    is htmlunit able to read in cookies set through javascript or not? would it be a better idea to use rhino for this, implementing it into an htmlunit bot?

    • Marc Guillemot said,

      December 12, 2011 at 2:55 pm

      HtmlUnit handle cookies like “real” browsers do. Rhino doesn’t know anything about cookies.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: