[Wtr-general] Can Watir be paused & resumed manually whenrunning
Jason He
Jason.He at resilience.com
Thu Mar 1 00:38:47 EST 2007
Thanks very much for you advice, it works and is really convenient.
One thing I notice is that, in this solution, if the script executing has been entering the block of functions whose prefix begin with "test_" (required by watir test), it will pause only after the finish the whole block of that function, rather than pause at the moment when I selecting part of the console window.
For example,
-----------------------------------------------
100 def test_b
101 goto_System_Admin
102 arr = Array.new
103 arr[0] = "specify the IP address of name servers for your environment."
104 goto_Verify_Help("nameserver", arr)
105 end
-----------------------------------------------
Imaging the script executing has been entering function test_b, now is executing line 101, I try to pause it by selecting part of the console window at that moment, however, it continue to execute until finish executing line 105.
If it could be paused at the moment when selecting part of console window, it will be better.
Regards,
Jason
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Fitisoff
Sent: 2007年3月1日 6:46
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can Watir be paused & resumed manually whenrunning
> How to catch keyboard input signal by manual to
> pause/resume the testing process, for example using
> CTRL+P to pause and CTRL+R to resume.
There's a really easy, low-tech way to do this in
Windows. Any console application can be paused by
selecting part of the console window. Try this:
-Open a windows command prompt.
-Right-click on the title bar and select Properties.
-Select the Options tab, check QuickEdit Mode, click
OK.
-Start running the test script.
-Stop the script by selecting some area of the console
window so that it's now highlighted (it may take a
second for the current browser action to finish
completing).
-Right-click in the window to clear the selected area
so the script can continue.
It's basically the same as a keypress option without
the need to worry about coding the behavior.
--- Jason He <Jason.He at resilience.com> wrote:
> Yeah, ruby-breakpoint could pause the application,
> but it depends on the program and the test
> condition.
>
> How to catch keyboard input signal by manual to
> pause/resume the testing process, for example using
> CTRL+P to pause and CTRL+R to resume.
>
> Thanks,
> Jason
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf
> Of John Lolis
> Sent: 2007Äê2ÔÂ27ÈÕ 21:06
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] Can Watir be paused &
> resumed manually when running
>
> I like using
>
> http://rubyforge.org/projects/ruby-breakpoint/
>
> all you do is call "breakpoint()" and the
> application stops. The best part is that you are now
> at the IRB prompt so you can do all sorts of fun
> things :)
>
> I setup my smoke test to call break point on any
> exception, i can then hop in and see exactly whats
> going on and fix it.
>
---------------------------------------------------------------------
> Posted via Jive Forums
>
http://forums.openqa.org/thread.jspa?threadID=6704&messageID=19277#19277
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
More information about the Wtr-general
mailing list