Re: [Wtr-general] how to include external script (.rb) in Watir?
On 5/5/07, Alien Ruby [EMAIL PROTECTED] wrote: How are you guys so helpful ? We get a lot of chunky bacon for every correct answer. :) Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] how to include external script (.rb) in Watir?
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. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to include external script (.rb) in Watir?
Hi, Put require 'extra' near the top of main.rb. For now keep them both (extra.rb and main.rb) located in the same folder. Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to include external script (.rb) in Watir?
thanks for the quick respond. that was easy, huh.. I just thought too much on that one. beginner...:( ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to include external script (.rb) in Watir?
On 5/4/07, Alien Ruby [EMAIL PROTECTED] wrote: thanks for the quick respond. You are welcome. :) that was easy, huh.. It is Ruby, (almost) everything is easy here. I just thought too much on that one. beginner...:( It happens. That is why this mailing list exists. Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to include external script (.rb) in Watir?
How are you guys so helpful ? It just makes me want to keep coding all weekend. need lots of coffee then... have a great weekend, guys..!! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to include external script (.rb) in Watir?
On 5/4/07, Alien Ruby [EMAIL PROTECTED] wrote: How are you guys so helpful ? That's actually a really good question. The people who started Watir had all participated in other Open Source projects, some successful, some unsuccessful. The early Watir community insisted that everyone, particularly beginners, be treated with respect and courtesy. Many, if not most, of the Watir community are not expert programmers. If the project is going to continue, and continue to be successful, two things have to happen: beginners must continue to be treated with respect and courtesy; and as people get more experience with Watir and Ruby, they have to be encouraged in turn to help out where they can contribute. Mostly this means answering questions on the list: if you see a question you can answer, please do so. It's OK if you're wrong-- as long as you are not deliberately misleading, we will all learn something. In addition, if you can help with documentation or patches or features, please contribute that work also. Charley just asked today for contributions to the user guide. Maybe a reference to the copy of Pickaxe included with the Ruby distro would be a good thing. One very exciting project happening sort of under the radar is to make Watir, FireWatir, SafariWatir, (and possibly Selenium RC) all have a more consistent set of functionality and syntax. I'm not a great programmer, but I like to answer off-topic questions on the list, and I've started to use the non-IE Watirs, and I contributed my first inconsistency report yesterday. The point being, that a few little contributions here and there move the project along nicely, as long as a large number of people are making the contributions. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general