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