Thanks Luke. Yes, stop() is mentioned in WWW::Selenium. But I think
there is still a significant bug because my code example shows the
autodie feature is broken in WWW::Selenium.
I think the autodie feature is important. When I'm running a single
test, I want the test to start a browser at the beginning and shutdown
at the end. When I'm running a whole suite of tests, I'd like to run
all the tests against a single browser instance. This provides a
significant speed improvement since I don't have to wait for the browser
to restart.
If I have to explicitly put a stop() in each test, I can't run a whole
suite of tests against a single browser instance.
On Wed Aug 31 11:40:20 2011, lukecloss@gmail.com wrote:
Show quoted text> It's mentioned in the docs for WWW::Selenium -
>
https://metacpan.org/module/WWW::Selenium which is the superclass of
> Test::WWW::Selenium.
>
> Maybe it could be better spelled out in the Test::WWW::Selenium docs.
>
> On Wed, Aug 31, 2011 at 8:35 AM, Eric D Johnson via RT
> <bug-Test-WWW-Selenium@rt.cpan.org> wrote:
gets
Show quoted text> > cleaned up. This is not in the documentation though.
> >
> > On Mon Aug 29 16:52:26 2011, kablamo wrote:
> >> The following code causes the browser to keep running even after
the
Show quoted text> >> test completes. They key part which seems to break everything is
the
Show quoted text> >> subroutine 'fooey'.
> >>
> >> use Test::More;
> >> use Test::WWW::Selenium;
> >>
> >> # Parameters are passed through to WWW::Selenium
> >> my $sel = Test::WWW::Selenium->new(
> >> host => "localhost",
> >> port => 4444,
> >> browser => "*firefox",
> >> browser_url => "
http://www.google.com",
> >> );
> >>
> >> # use special test wrappers around WWW::Selenium commands:
> >> $sel->open_ok("
http://www.google.com");
> >> $sel->type_ok( "q", "hello world");
> >>
> >> done_testing;
> >>
> >> sub fooey {
> >> return $sel->get_location();
> >> }
> >>
> >> I get no error message. But if you do 'ps awwwux | grep firefox',
you
Show quoted text> >> will see that the browser is still running.
> >>
> >> Also, I haven't figured out how to duplicate it, but I think this
is
Show quoted text> >> related to the above: I sometimes get an error message that looks
> > like
> >> this:
> >>
> >> (in cleanup) Error requesting
http://localhost:6543/selenium-
Show quoted text> >> server/driver/:
> >> 500 Can't call method "FETCH" on an undefined value
> >
> >
> >
> >