One thing you could do just to print out the page source is something like this:
try {
// failing tests
assertTrue(false);
} catch (AssertionFailedError e) {
System.err.println(getPageSource());
throw e;
}
That way, if a test case fails, this will print out the source of the
current page from JWebUnit and put it on the command line.
Another option is to look at your server logs and make sure it is
accessing the correct page.
Hope this helps,
Jevon
On Fri, Aug 21, 2009 at 5:14 PM, Singh-2, Rajinder<[email protected]> wrote:
> Thanks for your reply Jevon.
> But i dont find any <base href=".."> tag in the view source.
> Through the interface the application is working fine but its only the
> JWebunit code which takes the application to some wrong page.
>
> Can you please help me in resolving this issue.
>
> Regards
> Rajinder
>
>
>
> -----Original Message-----
> From: Jevon Wright [mailto:[email protected]]
> Sent: Fri 8/21/2009 10:28 AM
> To: JWebUnit Development mail list
> Subject: Re: [JWebUnit-development] JwebUnit-Help Needed
>
> Hi,
>
> It sounds like you are using a <base href=".."> tag that isn't in the
> <head> block, and as a result, all the URLs in your page are pointing
> to the wrong base address. Can you move the <base href=".."> tag into
> the <head> block of your source HTML?
>
> Jevon
>
> On Fri, Aug 21, 2009 at 4:45 PM, Singh-2, Rajinder<[email protected]>
> wrote:
>>
>> Hi,
>>
>> Whenever I try to click a button on the page using Jwebunit its takes me
>> to
>> some wrong page.
>> On the console it gives me warning message
>>
>> 'WARN - Element 'base' must appear in <head>, it is ignored.
>> -com.gargoylesoftware.htmlunit.html.HtmlPage '
>>
>> How can I correct this issue. Please help Its urgent .
>>
>> Note: its working fine when this warning does not come.
>>
>> Regards
>> Rajinder
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> _______________________________________________
>> JWebUnit-development mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>>
>>
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> JWebUnit-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> JWebUnit-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
>
------------------------------------------------------------------------------
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
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development