Hello, Thanks for the responses.
Honestly, my ultimate goal is to make this one gwt application crawlable. >From what I understand, I need HtmlUnit to be run on the server side. However, I read somewhere that you can also implement HtmlUnit to display text-based pages on the client side too. Hence, I wanna first try it out on the client side and get an idea of what HtmlUnit delivers. Then, I plan to apply it to the server side. At first, I didn't bother with JUnit since I read that HtmlUnit doesn't require JUnit to run. So, what I did was, I created a new gwt project using the "New Web Application Project" button on Eclipse. Then, I added lines that invoke WebClient and HtmlPage inside onModuleLoad like this: http://www.mwmechanics.net/Screenshot-1.png The code got compiled fine and gave me this http://127.0.0.1:8888/HtmlUnitAttempt.html?gwt.codesvr=127.0.0.1:9997. When I opened this url on the browser, I noticed errors as shown here: http://www.mwmechanics.net/Screenshot-2.png These are the libraries I have under /WEB-INF/lib and Properties-> Java Build Pat -> libraries: http://www.mwmechanics.net/Screenshot-3.png and http://www.mwmechanics.net/Screenshot-4.png After realizing that I couldn't run it, I tried to invoke WebClient and HtmlPage from inside Junit test file just to see if it will run. So, basically, I really didn't need to use JUnit. Any idea what might be causing this "did you forget to inherit a required module" error? Thank you! On Jan 11, 6:50 pm, Thomas Broyer <[email protected]> wrote: > GWTTestCase-s are for using "client code" in your tests. This means your > tests will be run either in DevMode or compiled to JavaScript (and either in > a real browser or in HtmlUnit, as bundled within GWT's JUnitShell). > > In your case, you want to use HtmlUnit *within* your test code, so it has to > *not* be a GWTTestCase. > > (if you're *a beginner*, may I ask why you want to use HtmlUnit in your > test? there might be other solutions for the problem you're trying to solve) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
