Hi,

When I try using breakpoint from below, I get the following error:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__': No
such file to load -- breakpoint (LoadError)
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
        from C:/watir/CRIScripts/JobApply.rb:39 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Verhovsky
Sent: Monday, August 01, 2005 7:42 PM
To: [email protected]
Subject: Re: [Wtr-general] Command Line Arguments

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
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general



_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to