[Wtr-general] how to include external script (.rb) in Watir?
Alien Ruby
forum-watir-users at openqa.org
Fri May 4 14:21:16 EDT 2007
Hi guys,
I apologize if this thread had been discussed before. I was looking for it, but I couldnt find it.
here is what I'm trying to do.
I define a bunch of classes and functions in a.rb file, and I'm going to write the main script which hopefully can interact/use all the functions and classes in .rb scripts. Let's say all the functions and classes are defined in extra.rb and my main driver script is main.rb.
My question is what the script is to include/require extra.rb file in my main.rb.
The reason is in main.rb, I want to have something simple like,
# the header
require 'watir' # the watir controller
require 'win32ole' # excel sheet
?? require 'extra.rb' or open 'extra.rb' or what??
...
# the script
DoEverything1() # function defined in extra.rb
DoEverything2() # function defined in extra.rb
...
# end of script
any help or hint will be much appreciate. thank you.
More information about the Wtr-general
mailing list