Thanks again Zeljko, I was reading the poignant guide and the Pragmatic guide but I’m relatively new to OO programming.. I was having a mess with Classes  =(. Your method worked really fine, without classes!

And thanks for the link, I’ll test it!

 

Cheers

Rodrigo Julian Martin

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zeljko Filipin
Sent: Martes, 18 de Abril de 2006 10:03 a.m.
To: [email protected]
Subject: Re: [Wtr-general] Library of Functions and Watir 1.5 Questions

 

1) please do read Programming Ruby (http://www.rubycentral.com/book/)

Until you read it...

make file call_me.rb that contains

def do_something(argument)
  # do something
end

make file call_another_file.rb that contains

require "call_me" # this includes call_me.rb
do_something(argument) # this calls method do_something

2) watir 1.5 is not released, but previews are here http://wiki.openqa.org/display/WTR/Development+Builds

On 4/18/06, Rodrigo Julian Martin <[EMAIL PROTECTED]> wrote:

Hello everybody!

 

I have two questions for you:

 

1)       How can I make a Library of Functions in Watir/Ruby? I mean, a single .rb file which has different functions (I've read that ruby doesn't have functions but something similar), which can be called by any other ruby file and passing parameters to it?

 

2)       Where can I download Watir 1.5? I really need the Modal Dialogs support..

 

Thanks in Advance!

Cheers

 

Rodrigo Julian Martin.


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general




--
http://www.testingreflections.com/blog/3071

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to