HtmlUnit 2.5 support

View: New views
2 Messages — Rating Filter:   Alert me  

HtmlUnit 2.5 support

by jameleon-developers mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Greetings,

are there any plans to make Jameleon to support HtmlUnit 2.5?  I am writing a regression suite for a site that relies quite heavily on jQuery 1.3, which only got a full support in HtmlUnit 2.5


I played around replacing htmlunit-1.4,jar with htmlunit-2.5.jar (and a number of other upgraded linraries). The problem with that is that HtmlUnit has removed completely a deprecated class HtmlUnitXPath.

It apparently helped when I extended HtmlUnitHelper and overrode  HtmlUnitHelper.getHtmlElementByXPath(DomNode container, String xpath). I then extended HtmlUnitFunctionTag and made it to use my custonm helper. The problem is that now I have to override almost all htmlunit tags dealing with xpathes. Which is fine, but I'd welcome a cleaner solution.

Here is the change I made to HtmlUnitHelper (by extending)

MyHtmlUnitHelper extends HtmlUnitHelper {
    public MyHtmlUnitHelper(HtmlUnitDelegate htmlUnitDelegate) {
        super(htmlUnitDelegate);
    }

    public HtmlElement getHtmlElementByXPath(DomNode domNode, String s) {
        return domNode.getFirstByXPath(s);  
    }
}

If this is indeed the only change needed in order to support HtmlUnit 2.5, would it be reasonable to expect official Jameleon with HtmlUnit 2.5 support sometime soon?

I would appreciate your insight and suggestions.

Regards,
Luba Roitman.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jameleon-developers mailing list
Jameleon-developers@...
https://lists.sourceforge.net/lists/listinfo/jameleon-developers

Re: HtmlUnit 2.5 support

by jameleon-developers mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Luba,

There are quite a few unit/acceptance tests for that plug-in. You should be able to run the tests and see if anything else needs to be changed. If you make the changes, making sure all of the tests still pass, then I'll put the changes in. Someone else posted an HtmlUnit plug-in patch a while back too. This would be the best time to apply both.

Regards,
Christian




----- Original Message ----
From: "jameleon-developers@..." <jameleon-developers@...>
To: jameleon-developers@...
Sent: Saturday, August 1, 2009 11:13:56 AM
Subject: [Jameleon-developers] HtmlUnit 2.5 support


Greetings,

are there any plans to make Jameleon to support HtmlUnit 2.5?  I am writing a regression suite for a site that relies quite heavily on jQuery 1.3, which only got a full support in HtmlUnit 2.5


I played around replacing htmlunit-1.4,jar with htmlunit-2.5.jar (and a number of other upgraded linraries). The problem with that is that HtmlUnit has removed completely a deprecated class HtmlUnitXPath.

It apparently helped when I extended HtmlUnitHelper and overrode  HtmlUnitHelper.getHtmlElementByXPath(DomNode container, String xpath). I then extended HtmlUnitFunctionTag and made it to use my custonm helper. The problem is that now I have to override almost all htmlunit tags dealing with xpathes. Which is fine, but I'd welcome a cleaner solution.

Here is the change I made to HtmlUnitHelper (by extending)

MyHtmlUnitHelper extends HtmlUnitHelper {
    public MyHtmlUnitHelper(HtmlUnitDelegate htmlUnitDelegate) {
        super(htmlUnitDelegate);
    }

    public HtmlElement getHtmlElementByXPath(DomNode domNode, String s) {
        return domNode.getFirstByXPath(s);  
    }
}

If this is indeed the only change needed in order to support HtmlUnit 2.5, would it be reasonable to expect official Jameleon with HtmlUnit 2.5 support sometime soon?

I would appreciate your insight and suggestions.

Regards,
Luba Roitman.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jameleon-developers mailing list
Jameleon-developers@...
https://lists.sourceforge.net/lists/listinfo/jameleon-developers



     

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jameleon-developers mailing list
Jameleon-developers@...
https://lists.sourceforge.net/lists/listinfo/jameleon-developers