Hi Eric,
I assume you have tried getPageSource()? I don't know of any way to
get the computed (i.e. runtime) page source, either through JWebUnit
or HtmlUnit, but there probably is a way.
If you use getElementByXPath("/") you could navigate through the DOM
using IElement, I suppose. Why do you require access to the DOM?
Cheers
Jevon
On Fri, Feb 4, 2011 at 8:24 AM, Eric Jelinek <[email protected]> wrote:
> Jevon,
>
> So I've implemented the NicelyResynchronizingAjaxController and it seems to
> handle all of the client side js, my question is this, after the page is done
> doing its thing, should I be able to dump out the new DOM? If so I haven't
> been able to accomplish that is there a way?
>
> Thanks for your help
> Eric
>
> -----Original Message-----
> From: Jevon Wright [mailto:[email protected]]
> Sent: Monday, January 31, 2011 9:52 PM
> To: Usage problems for JWebUnit
> Subject: Re: [JWebUnit-users] Full Page DOM
>
> Hi Eric,
>
> Thanks for looking into the problem! It sounds like perhaps using the
> NicelyResynchronizingAjaxController might help in your case?
>
> Jevon
>
> On Tue, Feb 1, 2011 at 8:23 AM, Eric Jelinek <[email protected]> wrote:
>> Jevon,
>>
>> So I started looking at htmlunit since it was mentioned with gwt. I setup a
>> simple test to get a gwt element on the page. Once the code hit the break
>> point I was trying to decide on which element to go with and then I noticed
>> in the output window several lines going by. At the end of the log showed,
>> 12:58:51.804 [JS executor for
>> com.gargoylesoftware.htmlunit.WebClient@d1a34a] DEBUG
>> c.g.h.j.b.JavaScriptJobManagerImpl - Finished job JavaScript Execution Job
>> 6: window.setTimeout(1). There were actually several of these. Then I went
>> and tried to get an element by id and it was successful. Then I tried it
>> with jwebunit and got the same results. All that to say I needed to wait for
>> the js to finish loading and running. As a suggestion for enhancement, there
>> may need to be an event or something that says the JS is finished. Not sure
>> how or even if it's possible but something to consider/think about.
>>
>> Eric
>>
>> -----Original Message-----
>> From: Eric Jelinek [mailto:[email protected]]
>> Sent: Friday, January 28, 2011 10:49 AM
>> To: Usage problems for JWebUnit
>> Subject: Re: [JWebUnit-users] Full Page DOM
>>
>> Jevon,
>>
>> After some digging around I see that the ui was built using GWT. I've done
>> some quick reading on GWT and looks like it too is using HtmlUnit. Has
>> anyone had success testing GWT with jWebUnit?
>>
>> Eric
>>
>> -----Original Message-----
>> From: Eric Jelinek [mailto:[email protected]]
>> Sent: Monday, January 24, 2011 2:43 PM
>> To: Usage problems for JWebUnit
>> Subject: Re: [JWebUnit-users] Full Page DOM
>>
>> Jevon,
>>
>> I'm using both FF3.6 and CR8. Client-side js. I do have access to all of the
>> code, both client and server. I've been writing my tests in intellij 10 and
>> I hit my break point, dumpout getPageSource to a text file and browse
>> through it to find elements, xpaths, etc.
>>
>> I'll take a closer look at the js code to see which steps are firing.
>>
>> Thanks for your help
>>
>> Eric
>>
>> -----Original Message-----
>> From: Jevon Wright [mailto:[email protected]]
>> Sent: Saturday, January 22, 2011 5:51 AM
>> To: Usage problems for JWebUnit
>> Subject: Re: [JWebUnit-users] Full Page DOM
>>
>> Hi Eric, a few ideas:
>>
>> - What browser are you using to view source?
>> - Do you use client-side Javascript or server-side code to populate
>> "controlPanelMenu"?
>> - Can you access the source code of the application to try and
>> pinpoint the problem?
>>
>> As far as I know, in Firefox the "view source" only displays the page
>> source at load, and not after any client-side modifications, unless
>> you are viewing selection source.
>>
>> Hope this helps,
>> Jevon
>>
>> On Sat, Jan 22, 2011 at 11:38 AM, Eric Jelinek <[email protected]> wrote:
>>> All,
>>>
>>>
>>>
>>> I'm running into an issue where I ask for the page source, getPageSource()
>>> and I get one value, yet when I view the source of the page I'm getting not
>>> only what I'd expect with getPageSource but I'm getting much more. As an
>>> example:
>>>
>>>
>>>
>>> getPageSource()
>>>
>>> <html>
>>>
>>> <head>some stuff...</head>
>>>
>>> <body>
>>>
>>> <div id="head></div>
>>>
>>> <div id="controlPanelMenu"></div>
>>>
>>> <div id="footer"></div>
>>>
>>> </body>
>>>
>>> </html>
>>>
>>>
>>>
>>> View source
>>>
>>> <html>
>>>
>>> <head>some stuff...</head>
>>>
>>> <body>
>>>
>>> <div id="head></div>
>>>
>>> <div id="controlPanelMenu">
>>>
>>> All kinds of html and stuff in here that I can actually see on the page and
>>> interact with firebug.
>>>
>>> </div>
>>>
>>> <div id="footer"></div>
>>>
>>> </body>
>>>
>>> </html>
>>>
>>>
>>>
>>> Any ideas on how to get to the "All kinds of html and stuff..."?
>>>
>>>
>>>
>>> Thanks in advance
>>>
>>> Eric Jelinek
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>>> Finally, a world-class log management solution at an even better price-free!
>>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>>> February 28th, so secure your free ArcSight Logger TODAY!
>>> http://p.sf.net/sfu/arcsight-sfd2d
>>> _______________________________________________
>>> JWebUnit-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>> JWebUnit-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>> JWebUnit-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>> JWebUnit-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>> JWebUnit-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> JWebUnit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> JWebUnit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users