Tim Feltham wrote:
type "irb" at the command prompt (without the ")
Even better, there is this RubyForge project called 'breakpoint',
http://ruby-breakpoint.rubyforge.org/wiki/wiki.pl?HomePage, which opens
an IRB session inside a running Ruby program. With it, you can do
something like
test/watir/long_convoluted_test_script.rb
require 'watir'
include Watir
config = load_configuration
database = connect_to_database
ie = IE.start('http:/foo.bar.com/login')
ie.text_field(:id, 'username').set_value('me')
...
...
...
# somewhere in the middle
require 'breakpoint'
breakpoint
...
and this will execute the script until breakpoint and then open an IRB
session in which the actual values of ie, configuration, database are
available and even can be modified. As well as any other variable
visible from the breakpoint location. Exiting the IRB continues the
program.
This is often the easiest way to get to the state that you want to play
with. Besides, you can do conditional breakpoints
breakpoint if <some arbitrarily complex condition>
Bottom line: don't leave home without it.
Alex
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general