Feature Requests item #2697234, was opened at 2009-03-20 11:49 Message generated for change (Settings changed) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=2697234&group_id=61302
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core API Group: Release 2.2 >Status: Closed Priority: 8 Private: No Submitted By: James Tse (jtse) Assigned to: Jevon Wright (jevonwright) Summary: Make HtmlUnit objects accessible Initial Comment: I've been trying to figure out a way to synchronize ajax calls instead of using Thread.sleep. I know it's possible to do it via HtmlUnit. However, the HtmlUnit API is not directly accessible via JWebUnit. I was wondering if it would be possible to give users of JWebUnit API direct access to HtmlUnit APIs. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2009-12-15 02:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Jevon Wright (jevonwright) Date: 2009-11-30 06:35 Message: You can now (in SVN r815) gain access to the current WebWindow and WebClient in the HtmlUnitTestingEngineImpl. That is, something like: WebTester wt; ((HtmlUnitTestingEngineImpl) wt.getTestingEngine()).getWebClient(); For the example above with a new WebClient, you would need to do something like this (I think, not tested): 1. Create your own subclass of WebTester 2. Override initializeDialog() to create a new ITestingEngine 3. In this method, return a new HtmlUnitTestingEngineImpl(WebClient) ---------------------------------------------------------------------- Comment By: James Tse (jtse) Date: 2009-03-23 11:59 Message: There is the NicelyResynchronizingAjaxController (which may be an outdated approach): WebClient webClient = new WebClient(); webClient.setAjaxController(new NicelyResynchronizingAjaxController()); And there's also HtmlUnit's ThreadManager.joinAll(long maxWaitMillis) (which is an experimental API): http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/ThreadManager.html#joinAll(long) It would be nice if there was a JWebUnit API call to do this but I think the API calls to do AJAX synch-ing in HtmlUnit is unstable (as in likely to change in the future). This is why I suggest exposing the HtmlUnit objects to give users of JWebUnit the option to use these bleeding edge features. Thanks :) ---------------------------------------------------------------------- Comment By: Jevon Wright (jevonwright) Date: 2009-03-22 23:48 Message: That is a good idea, how does HtmlUnit support synchronising with Ajax calls? Cheers :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=2697234&group_id=61302 ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ JWebUnit-development mailing list JWebUnit-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jwebunit-development