[wtr-general] Re: automating httpwatch with watir

2015-03-03 Thread Justin Ko
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\HTTPWatchruby 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.


[wtr-general] Re: automating httpwatch with watir

2015-02-25 Thread Super Kevy
What version of Watir are you on?

require  'watir-classic' # or require 'watir-webdriver'
ie = Watir::Browser.new(:internet_explorer')
ie.maximize







On Monday, February 23, 2015 at 11:38:19 PM UTC-6, 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\HTTPWatchruby 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.