Oops, The code for the display of the Global variables I previously posted was a cut 'n paste mistake. The correct code is:
# Variables puts2("\nRuby Global Variables: ") aRubyGlobalVars = global_variables() # Populate array with the Ruby Global variables aRubyGlobalVars.each do |key| # Loop through the Ruby Global variables if(eval(key).class.to_s == "String") puts2(" #{key.to_s} = \"" + eval(key).to_s + "\",\t Class: " + eval(key).class.to_s) else puts2(" #{key.to_s} = " + eval(key).to_s + ",\t Class: " + eval(key).class.to_s) end end # End of Variables loop On Apr 30, 9:43 am, joedio <joe...@comcast.net> wrote: > Betsy, > > One of the things to do is to gather info on the execution > environment. Perhaps somewhere during the scripts execution of the > first (working) and second (failing) attempt, something is either > trying to require or include safariwatir, or the browser type > (Watir.options[:browser]) is getting set incorrectly. > > Below is code to gather a lot of that info. It prints out info on > Ruby, the O/S, the files Ruby has loaded, and each of the Global > variables defined in Ruby, at that point in the scripts execution. > Temporarily put it into your failing script, once just before the > first (working) invocation of the browser, and then again just before > the second time (the one that raises the safariwatir message). Perhaps > you can't spot a difference. Post the output back here if you wish, > and someone may be able to use it to further assist with this issue. > > Also, presuming that you are using Watir1.6.5 is there a reason you > are starting the browser with: > require 'firewatir' > include FireWatir > $ie=FireWatir::Firefox.new > > instead of the newer (As described in the CommonWatir Rdoc for the > class Watir::Browser): > require 'watir' > $browser = Watir::Browser.new # Of course you can still name > the global browser $ie instead if $browser if you prefer, as I switch > between IE & FF I prefer to use $browser > > You might want to switch over to the newer one and see if that has any > bearing on the issue. > > Here's the code I was mentioning: > > # Collect information on the execution environment > > # Ruby & Browser > puts("RUBY_VERSION: " + RUBY_VERSION) > puts("RUBY_PLATFORM: " + RUBY_PLATFORM) > puts("Browser: " + Watir.options[:browser]) > > # O/S > puts("\nOS ENV Variables: ") > ENV.each do |key, value| # Loop through the O/S Env variables > puts(" #{key} = #{value}") # Display each variable and its setting > end # End of O/S loop > > # Loaded Files > puts("\nRuby Loaded files: ") > $LOADED_FEATURES.each do |value| # Loop through the files > puts(" #{value}") # Display each file > end # End of Files loop > > # Global Variables > puts("\nRuby Global Variables: ") > aRubyGlobalVars = global_variables() # Populate array with the Ruby > Global variables > aRubyGlobalVars.each do |key, value| # Loop through the Ruby Global > variables > puts(" #{key} = #{value}") # Display each variable and its > setting > end # End of Variables loop > > On Apr 29, 6:13 am, Betsy <joybe...@gmail.com> wrote: > > > > > Hi, > > > Still waiting for a way out of this FireWatir issue. > > > -Betsy > > > On Apr 21, 2:51 pm, Željko Filipin <zeljko.fili...@wa-research.ch> > > wrote: > > > > On Wed, Apr 21, 2010 at 11:35 AM, Betsy <joybe...@gmail.com> wrote: > > > > include FireWatir > > > > Remove this and let me know if there is any improvement. > > > > > The problem with this issue is that it does not come up every time. > > > > That would make it hard to debug. > > > > Željko > > > > -- > > > Before posting, please readhttp://watir.com/support. In short: search > > > before you ask, be nice. > > > > You received this message because you are subscribed > > > tohttp://groups.google.com/group/watir-general > > > To post: watir-general@googlegroups.com > > > -- > > Before posting, please readhttp://watir.com/support. In short: search > > before you ask, be nice. > > > You received this message because you are subscribed > > tohttp://groups.google.com/group/watir-general > > To post: watir-general@googlegroups.com > > To unsubscribe: watir-general+unsubscr...@googlegroups.com > > -- > Before posting, please readhttp://watir.com/support. In short: search before > you ask, be nice. > > You received this message because you are subscribed > tohttp://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com