You have installed commonwatir 3.0.0 and watir 1.9.0. Either install watir 3.0.0 or uninstall commonwatir 3.0.0 and try again.
Jarmo Pertman ----- IT does really matter - http://itreallymatters.net On Monday, July 30, 2012 4:52:30 PM UTC+3, Sophia Sunitha wrote: > > Hi, > > > > I have installed Ruby1.8.7. > > *Gem List:* > > > > C:\Ruby187\bin>gem list > > *** LOCAL GEMS *** > > builder (3.0.0) > commonwatir (3.0.0, 1.9.0) > cucumber (1.1.3) > diff-lcs (1.1.3) > ffi (1.1.0 x86-mingw32, 1.1.0.rc4 x86-mingw32) > firewatir (1.9.4, 1.9.0) > gherkin (2.6.7 ruby java) > hoe (3.0.6) > json (1.5.4, 1.5.0, 1.4.5 java) > minitest (2.5.1) > nokogiri (1.5.5 x86-mingw32, 1.5.0 x86-mingw32) > rake (0.9.2.2) > rautomation (0.7.2) > rdoc (3.9.4) > rspec (2.11.0, 1.3.2) > rspec-core (2.11.1) > rspec-expectations (2.7.0) > rspec-mocks (2.11.1) > rubygems-update (1.8.24) > s4t-utils (1.0.4) > term-ansicolor (1.0.6) > user-choices (1.1.6.1) > watir (1.9.0) > win32-api (1.4.8 x86-mingw32) > win32-process (0.6.6, 0.6.5) > windows-api (0.4.2, 0.4.1) > windows-pr (1.2.2, 1.2.1) > xml-simple (1.1.1) > > *This is the script that I run on Aptana Studio 3* > > > > require 'watir' > > require 'win32ole' > > save_dialog = WIN32OLE.new("AutoItX3.Control") > > def save_file(filepath) > > ai = WIN32OLE.new("AutoItX3.Control") > > ai.WinWait("File Download", "", 5) > > ai.ControlFocus("File Download", "", "&Save") > > sleep 1 > > ai.ControlClick("File Download", "", "&Save", "left") > > ai.WinWait("Save As", "", 5) > > sleep 1 > > ai.ControlSend("Save As", "", "Edit1",filepath) > > ai.ControlClick("Save As", "", "&Save", "left") > > ai.WinWait("Download complete", "", 5) > > ai.ControlClick("Download complete", "", "Close") > > end > > $ie = Watir::IE.new > > $ie.bring_to_front > > $ie.maximize > > $ie.goto 'http://xxxxx.com/aaaa/login/index.php' > > $ie.text_field(:name, 'username').set 'username' > > $ie.text_field(:name, 'password').set password' > > $ie.button(:value,'Login').click > > *$ie.link(:text, 'Basics of CT').click* > > *$ie.link(:text ,'Session01_Introduction_to_Computer’).click_no_wait* > > *save_file("C:\\mffdff.ppt")* > > *sleep 20* > > *puts 'download dialog appeared'* > > *$ie.link(:text ,'Logout').click* > > *$ie.close* > > > > *This is the error I am facing:* > > > > > > c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original_require': no such file to load -- watir/loader (LoadError) > > from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require' > > from c:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-3.0.0/lib/watir.rb:1 > > from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in > `gem_original_require' > > from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in > `require' > > from C:/Documents and Settings/321106/My Documents/Aptana Studio 3 > Workspace/cucumbertest/env.rb:1 > > > > Thanks in Advance, > > Sophia > > Tags: comma separated list > > × > > only suggested tags can be used > > suggested tags: > > > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
