Re: HTML Scraping / Posting Help
"Shawn Hartsock" <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <[email protected]> |
Take a look at gargoylesoftware's web client... Not just for testing web applications... http://groovy.codehaus.org/Testing+Web+Applications The web client is included with Groovy, but you can use it from Java if you prefer... import com.gargoylesoftware.htmlunit.WebClient I've written programs to use the webClient object to run Ajax calls in a mini-browser... You can even use it to fill in forms and simulate Ajax events. If you don't want a mini-browser the API will let you strip out Ajax calls or simulate a Mozilla or MSIE browser. Not all Javascript actions are fully supported but it works for many and is a damn sight better than trying to reverse-engineer a complex web app. So you can use the webClient to d as much a mini-browser or as little as you want. If you'd rather roll you own I'd use FireBug in FireFox to observe the Ajax posts and then reverse-engineer my app from those. I'd avoid rolling my own XUL environment. But if that's your speed, try the official XUL docs... I think this is part of it http://www.mozilla.org/rdf/doc/xul-template-reference.html On Wed, Aug 13, 2008 at 9:35 AM, Craig Taylor <[email protected]> wrote: > Due to some interoperability issues - I've been asked to write a program to > interact with a client's website and post the necessary data over. (Whatever > happened to flat files?) I've written a simple app using JTidy but recently > realized several problems: > > 1) Javascript interactions with forms (it won't be a simple matter of > grabbing the form action and passing that back). > 2) Javascript. > > Failing a "mini-browser" that I could embed within my app that would handle > Javascript issues etc does anyone know of a good reference to the Firefox > XUL(?) interaction so I could attempt to script it via a real browser? > > Thanks, > > - Craig Taylor > > _______________________________________________ > Juglist mailing list > [email protected] > http://trijug.org/mailman/listinfo/juglist_trijug.org > > -- /** Shawn.Hartsock http://hartsock.blogspot.com/ //*/