Here is the code and the  the error I am getting:
 
undefined method "LoginByUname" for #<Watir::IE:0x53c756c> <NoMethodError>
 
require 'watir'
require 'rubygems'
$browser = Watir::IE.new

class Login
$browser.goto("http://mail.yahoo.com";)
puts "Correct URL"

def LoginByUname(uname,pwd)
self.text_field(:id, "username").set('uname')
self.text_field(:id, "passwd").set('pwd')
self.button(:id, ".save").click
end
$browser.LoginByUname(@uname,@pwd)
end
 
 

On Friday, September 28, 2012 1:12:45 PM UTC-7, Joe Fl wrote:

> Hi, 
>
> Can you paste your code in here? 
>
> Thank you, 
> Joe 
>
> On Fri, Sep 28, 2012 at 3:49 PM, newlearner <[email protected]<javascript:>> 
> wrote: 
> > Hi there, 
> > I am getting this error when I ran the script in ruby. Any help is 
> > appreciated. 
> > 
> > undefined method "LoginByAccountno" for #<Watir::IE:0x68441e8> 
> > 
> > thanks. 
> > 
> > -- 
> > Before posting, please read http://watir.com/support. In short: search 
> > before you ask, be nice. 
> > 
> > [email protected] <javascript:> 
> > http://groups.google.com/group/watir-general 
> > [email protected] <javascript:> 
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to