Re: Foiled by JavaScript I suppose? Priority Vote
Stephen Cresswell <[email protected]> Fri, 25 Mar 2011 19:31:48 +0000
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============8690455806187629071== Content-Type: multipart/alternative; boundary=00151757714a20ee22049f53a5e5 --00151757714a20ee22049f53a5e5 Content-Type: text/plain; charset=ISO-8859-1 Try using geb. On 25 Mar 2011 19:26, "Izzy Alanis" <[email protected]> wrote: > 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. I may try V8 myself with either CURL or httpunit. >> I 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 > _______________________________________________ > Httpunit-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/httpunit-develop --00151757714a20ee22049f53a5e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p>Try using geb.</p> <p>On 25 Mar 2011 19:26, "Izzy Alanis" <<a href=3D"mailto:izzy= [email protected]">[email protected]</a>> wrote:<br type=3D"attributio= n">> If you're interested in automated *testing* of web applications= with<br> > browser quirks and behavior in mind, I've heard really good things= <br>> about Watir.<br>> <br>> If you're interested in automate= d access to web pages from java for<br>> something like data scraping, a= nd if it was just for a particular<br> > website... I'd probably hack around the javascript requirements of= the<br>> login page in question and just use curl or apache's HttpC= lient<br>> libraries instead (ah the heresy!).<br>> <br>> If you&#= 39;re interested in automated *rendering* of HTML pages from Java,<br> > I've had some success with the Lobo project's Cobra toolkit, b= ut that<br>> project is pretty stagnant (and if you're C/C++ minded,= run straight<br>> to WebKit!).<br>> <br>> Personally, I make exte= nsive use of httpunit's ServletUnit<br> > functionality for unit testing servlets -- primarily for web-services<= br>> and the like. The unit tests get run every time I build and they<br= >> thoroughly exercise the servlets in an embedded servlet container.<br= > > It's great! But I don't really ever find myself in need of the= built<br>> in javascript features. This is a bit philosophical, but I c= onsider<br>> Unit testing separate from Integration testing, and if you&= #39;re testing<br> > on a live running server, it feels a lot more like integration testing= <br>> to me... That's just my personal opinion though.<br>> <br>&= gt; Good luck!<br>> <br>> <br>> On Fri, Mar 25, 2011 at 2:31 PM, D= ee Ayy <<a href=3D"mailto:[email protected]">[email protected]</a>> w= rote:<br> >> I'm trying httpunit because I am trying to login via script to= a<br>>> website that I assume is running JavaScript as part of its<b= r>>> authentication method and I needed something to run the returned= <br> >> JavaScript which CURL does not run.<br>>><br>>> I got = an error:<br>>> org.mozilla.javascript.EcmaError: TypeError: Cannot f= ind function<br>>> addEventListener. (httpunit#19)<br>>><br> >> Then noticed "addEventListener" is not listed here<br>&g= t;> <a href=3D"http://httpunit.sourceforge.net/doc/javascript-support.ht= ml">http://httpunit.sourceforge.net/doc/javascript-support.html</a><br>>= ><br> >> Then I added HttpUnitOptions per<br>>> <a href=3D"http://htt= punit.sourceforge.net/doc/faq.html#unsupported">http://httpunit.sourceforge= .net/doc/faq.html#unsupported</a><br>>> and saw many more errors with= the first displaying as:<br> >> failed: org.mozilla.javascript.EcmaError: TypeError: Cannot find<b= r>>> function addEventListener. (httpunit#19)<br>>><br>>>= Are the "httpunit#" 's known unsupported TODO features?<br> >> Are they listed anywhere? -- probably in the httpunit source.<br>&= gt;><br>>> On my first target page, I have many 19's, so I'= ;d vote for that as a<br>>> priority, but I also have:<br>>> 19= <br> >> 32<br>>> 9<br>>> 838<br>>> 624<br>>> 226<b= r>>> 1<br>>><br>>> I suppose I am at a dead end regarding= my script login task.<br>>><br>>> Can anyone recommend a diffe= rent free offering that may be able to<br> >> login via "automation"?<br>>><br>>> But I wa= s also considering Google V8 JavaScript Engine<br>>> <a href=3D"http:= //code.google.com/p/v8/">http://code.google.com/p/v8/</a> "V8 is Googl= e's open source JavaScript<br> >> engine."<br>>><br>>> The httpunit developers may = want to consider using V8 for their<br>>> JavaScript support. =A0I ma= y try V8 myself with either CURL or httpunit.<br>>> =A0I saw that get= DOM method which I believe is the data V8 wants.<br> >><br>>> Regards,<br>>> Dee<br>>><br>>> -----= -------------------------------------------------------------------------<b= r>>> Enable your software for Intel(R) Active Management Technology t= o meet the<br> >> growing manageability and security demands of your customers. Busi= nesses<br>>> are taking advantage of Intel(R) vPro (TM) technology - = will your software<br>>> be a part of the solution? Download the Inte= l(R) Manageability Checker<br> >> today! <a href=3D"http://p.sf.net/sfu/intel-dev2devmar">http://p.s= f.net/sfu/intel-dev2devmar</a><br>>> ________________________________= _______________<br>>> Httpunit-develop mailing list<br>>> <a hr= ef=3D"mailto:[email protected]">Httpunit-develop@lists= .sourceforge.net</a><br> >> <a href=3D"https://lists.sourceforge.net/lists/listinfo/httpunit-d= evelop">https://lists.sourceforge.net/lists/listinfo/httpunit-develop</a><b= r>>><br>> <br>> -----------------------------------------------= -------------------------------<br> > Enable your software for Intel(R) Active Management Technology to meet= the<br>> growing manageability and security demands of your customers. = Businesses<br>> are taking advantage of Intel(R) vPro (TM) technology - = will your software <br> > be a part of the solution? Download the Intel(R) Manageability Checker= <br>> today! <a href=3D"http://p.sf.net/sfu/intel-dev2devmar">http://p.= sf.net/sfu/intel-dev2devmar</a><br>> ___________________________________= ____________<br> > Httpunit-develop mailing list<br>> <a href=3D"mailto:Httpunit-devel= [email protected]">[email protected]</a><br>>= ; <a href=3D"https://lists.sourceforge.net/lists/listinfo/httpunit-develop"= >https://lists.sourceforge.net/lists/listinfo/httpunit-develop</a><br> </p> --00151757714a20ee22049f53a5e5-- --===============8690455806187629071== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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 --===============8690455806187629071== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Httpunit-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/httpunit-develop --===============8690455806187629071==--