Re: Foiled by JavaScript I suppose? Priority Vote
Izzy Alanis <[email protected]> Fri, 25 Mar 2011 15:26:06 -0400
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
If you're interested in automated *testing* of web applications with browser quirks and behavior in mind, I've heard really good things about Watir. If you're interested in automated access to web pages from java for something like data scraping, and if it was just for a particular website... I'd probably hack around the javascript requirements of the login page in question and just use curl or apache's HttpClient libraries instead (ah the heresy!). If you're interested in automated *rendering* of HTML pages from Java, I've had some success with the Lobo project's Cobra toolkit, but that project is pretty stagnant (and if you're C/C++ minded, run straight to WebKit!). Personally, I make extensive use of httpunit's ServletUnit functionality for unit testing servlets -- primarily for web-services and the like. The unit tests get run every time I build and they thoroughly exercise the servlets in an embedded servlet container. It's great! But I don't really ever find myself in need of the built in javascript features. This is a bit philosophical, but I consider Unit testing separate from Integration testing, and if you're testing on a live running server, it feels a lot more like integration testing to me... That's just my personal opinion though. Good luck! On Fri, Mar 25, 2011 at 2:31 PM, Dee Ayy <[email protected]> wrote: > I'm trying httpunit because I am trying to login via script to a > website that I assume is running JavaScript as part of its > authentication method and I needed something to run the returned > JavaScript which CURL does not run. > > I got an error: > org.mozilla.javascript.EcmaError: TypeError: Cannot find function > addEventListener. (httpunit#19) > > Then noticed "addEventListener" is not listed here > http://httpunit.sourceforge.net/doc/javascript-support.html > > Then I added HttpUnitOptions per > http://httpunit.sourceforge.net/doc/faq.html#unsupported > and saw many more errors with the first displaying as: > failed: org.mozilla.javascript.EcmaError: TypeError: Cannot find > function addEventListener. (httpunit#19) > > Are the "httpunit#" 's known unsupported TODO features? > Are they listed anywhere? -- probably in the httpunit source. > > On my first target page, I have many 19's, so I'd vote for that as a > priority, but I also have: > 19 > 32 > 9 > 838 > 624 > 226 > 1 > > I suppose I am at a dead end regarding my script login task. > > Can anyone recommend a different free offering that may be able to > login via "automation"? > > But I was also considering Google V8 JavaScript Engine > http://code.google.com/p/v8/ "V8 is Google's open source JavaScript > engine." > > The httpunit developers may want to consider using V8 for their > JavaScript support. =A0I may try V8 myself with either CURL or httpunit. > =A0I saw that getDOM method which I believe is the data V8 wants. > > Regards, > Dee > > -------------------------------------------------------------------------= ----- > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Httpunit-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/httpunit-develop > ---------------------------------------------------------------------------= --- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software = be a part of the solution? Download the Intel(R) Manageability Checker = today! http://p.sf.net/sfu/intel-dev2devmar