1. Create rb file 1: test1.rb
class Test1
    def get_s(str)
        puts str
    end
end
test1=Test1.new
test1.get_s("test1 rb")

2. Create rb file 2: test2.rb
require 'watir'
class Test2
    def test2(str)
        puts str
    end
end
test2=Test2.new
test2.test2("In test2")

3. Create rb file 3: test3.rb
require 'watir'
path1= File.dirname(__FILE__)+'/test1.rb'
path2= File.dirname(__FILE__)+'/test2.rb'
system("ruby #{path1}")
system("ruby #{path2}")

Attention: test1.rb, test2.rb and test3.rb should be in the same directory.
In test3.rb, you just need to assign the right file directory, you can use
system("ruby #{path}") to run the script you want.

Expect it could help.

Wesley
Man should be hard to himself, but tolerant to others.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to