On Tue, May 25, 2010 at 11:24 PM, Phil Mcdonnell
<phil.a.mcdonnell / gmail.com> wrote:
> I'm trying to use Watir to log into a page.      > login button in order to click on it.   ɧ 
> it seems I need the following code:

> browser.button(:alt, 'Login').click
>
> However, the final line doesn't do anything.

> Here's the relavent html:

> input type='image' src ="/myca/logon/us/shared/images/btn_login.gif"
> alt="Login" style="margin-top:5;margin-left:20;margin-bottom:22" border
> = "0" tabIndex='5' onClick="javascript:loginNow();return false;">

I've never used Watir, but a quick glance at the API has this for the
"button" method --

"Used to access a button element. Usually an <input type = "button"> HTMLag."

Which the form snippet above clearly is not. So I'm not sure why you
expect this to work. :-)

Either you have to find the appropriate method, or select that input
element some other way.

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder / gmail.com
twitter: @hassan