The API for both Watir-Classic and HttpWatch have changed since that example was written. Updating to the latest API, the script would be:
require 'win32ole' require 'watir-classic' # Open the IE browser using Watir ie = Watir::Browser.new # Attach HttpWatch control = WIN32OLE.new('HttpWatch.Controller') plugin = control.IE.Attach(ie.ie) # Start recording plugin.Record() # Drive the browser ie.goto('www.google.ca') # Stop recording plugin.Stop() # Save the log file plugin.Log.Save('C:\Documents and Settings\Setup\Desktop\log.hwl') # Close IE ie.close - Justin Ko On Tuesday, February 24, 2015 at 12:38:19 AM UTC-5, Mike McClarin wrote: > > Hi, I am trying to automate httpwatch with watir. Please see my code below: > > require 'win32ole' > require 'watir' > > # Open the IE browser using Watir > ie = Watir::IE.new > > # Attach HttpWatch > control = WIN32OLE.new('HttpWatch.Controller') > plugin = control.Attach(ie.ie) > > # Start recording > plugin.Record() > > > When I run this in ruby, i receive the following alert: > > > C:\Users\mmcclarin\Desktop\HTTPWatch>ruby testexample04.rb > testexample04.rb:5:in `<main>': uninitialized constant Watir::IE > (NameError) > > > > Any help would be appreciated > > > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.