On Fri, May 21, 2010 at 1:14 AM, Phil Mcdonnell
<phil.a.mcdonnell / gmail.com> wrote:
> The other trick here is that this page is behind a login. Mechanize
> allows me to fill out the login form and holds onto the login
> credentials for me. Can harmony/celebrity/watir do this?

Watir definitely does that since it simply controls your browser and
therefore behaves exactly like one.

>>
>> The *really* interesting part is what does the Javascript do :-) with
>> (a potentially large) effort you may be able to "reverse-engineer" the
>> javascript and emulate manually in mechanize. I.e. if the javascript
>> builds a simple HTTP request, you may be able to send the same request
>> from mechanize (possibly) without much effort.
>
> How would one do this? I'm somewhat new to javascript as I usually
> don't do front end engineering. I see the below definition of this
> function in the HTML page. Any way I can sniff out what it's actually
> doing? I'm looking to figure out what the fireClick method displays.
>
>  <script type="text/javascript">
>   var d = document.domain.split(".");
>   document.domain = d[d.length - 2] + "." + d[d.length - 1];
>   var start = (new Date()).getTime();
>   var fireClick = function(){};
>   var omn_hierarchy="US|AMEX|Ser|eStatement";
>   var omn_pagename="MainPage";
>   var omn_language="en";
>   var omn_newpagename="yes";
>  </script>
>
> ... way down below...
>
> <td class="colPlus" onclick="fireClick(this,0)">
>          <a id="iroc_0" class="plus" href="#" onclick="return
> false;">&nbsp;</a>
> </td>
> --
> Posted via http://www.ruby-forum.com/.
>
>



-- 
Michael Fellinger
CTO, The Rubyists, LLC
972-996-5199