From: Josh Cheek Date: 2010-11-18T17:29:22+09:00 Subject: Re: How to Use WATIR --0016368325ac091c7f04954f969a Content-Type: text/plain; charset=ISO-8859-1 On Thu, Nov 18, 2010 at 12:52 AM, Sudeep P. wrote: > Hi, > > I am completely new to WATIR. > I have installed Ruby 1.9.2 and have also installed WATIR by the > command: > > gem install watir > > WATIR has been installed but I donot know how to write the WATIR scripts > and how to run them. Actually I know the syntax of writing it but do not > know where to write and how to save and run it. Like for HTML we write > it in Notepad and save with an extension name of .htm . The same way > please can you tell me the procedure for writing and executing a WATIR > script. > > > Thanks in advance, > Sudeep > > -- > Posted via http://www.ruby-forum.com/. > > 1. Save it in a text file, like query_google.rb (or whatever yours does) 2. Open up a terminal. On Mac, you can type "Terminal" into the spotlight, and it will locate the application for you. On Windows, Click the start bar, then click run, then type in "cmd" (If you're on Windows 7, you have something called the power shell that is worth looking into) 3. Navigate to the directory you saved it in (use "cd mydir" to change to the "mydir" directory -- directory is nerdspeak for folder -- on windows, these commands might be different) 4. Type "ruby query_google.rb" --0016368325ac091c7f04954f969a--