Julian, Thanks for pointing out the dumpResponse command. That showed me that my problem was due to operator error. :-) My web page is set only to work with Internet Explorer, and so I was getting back a different page that I expected which didn't contain a form.
However, I have now tried to set the User Agent to the browser version I'm using and I am still getting back a page telling me I'm using the wrong browser. My code is set to look for a User Agent string that contains the text MSIE. I have set the user agent in the TestContext to the same User Agent that IE shows me when it hits a page: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Before I run my test I output getTestContext().getUserAgent() to the console, and it shows the me string that I set. However, when I check my Apache logs the user agent that is actually coming through is: httpunit/1.5. The documentation shows you can access the httpunit WebClient directly; however, my object explorer shows that the methods for getting and setting the web client are no part of the library. Thanks for all you help so far! -Dave On Fri, 12 May 2006, Julien Henry wrote: > > I don't think you miss a library. Could you please insert a > dumpResponse() after the beginAt(), and paste here the returned content. > > Julien > > David Bloom a écrit : > > Julian, > > > > I'm still having the same problem with that build. Is there a library > > I'm missing from my class path? > > > > <?xml version="1.0" encoding="UTF-8"?> > > <classpath> > > <classpathentry kind="src" path=""/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/core-1.3-SNAPSHOT.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/httpunit-1.6.1-20060101.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/httpunit-plugin-1.3-SNAPSHOT.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/js-1.6R2.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/jtidy-4aug2000r7-dev.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/junit-3.8.1.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/nekohtml-0.9.1.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/regexp-1.3.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/servlet-api-2.3.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/xercesImpl-2.6.2.jar"/> > > <classpathentry kind="lib" path="C:/Documents and Settings/DavidB/My > > Documents/jwebunit - httpunit/xmlParserAPIs-2.2.1.jar"/> > > <classpathentry kind="con" > > path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.5.0_04"/> > > > > <classpathentry kind="output" path=""/> > > </classpath> > > > > Thanks for your help! > > > > -Dave > > > > Hi Dave, > > > > I couldn't manage to reproduce your bug with the current SVN version. > > Could you please try to use these libs : > > http://jwebunit.sourceforge.net/jwebunit%20-%20httpunit.zip and see if > > it still doesn't work. > > > > ++ > > Julien > > > > David Bloom a écrit : > >> Hi there. I'm a newbie to jWebUnit, and I'm having a problem with the > >> assertFormPresent command. I've got a JSP page that generates an html > >> page that contains a form. I'm trying to write a test that ensures > >> that form exists as part of the html and can be sucessfully submitted. > >> I've written my initial test case which first check that the JSP page > >> is there, and then tries to test if a form exists within the page. > >> The test for the page existing passes, but the test for the form does > >> not. The problem is I can see that the form _is_ there when I view > >> the source of the page. > >> > >> Here's my WebTe --- Dave Bloom http://www.digitalnoise.net Of course, long before you mature, most of you will be eaten ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
