|
|
@@ -12,9 +12,12 @@ extends 'Selenium::Remote::Driver';
|
|
|
# greater
|
|
|
my $driver = Selenium::Firefox->new;
|
|
|
my $driver = Selenium::Firefox->new( marionette_enabled => 1 );
|
|
|
+ # execute your test as usual
|
|
|
+ $driver->shutdown_binary;
|
|
|
|
|
|
# For Firefox 47 and older, disable marionette:
|
|
|
my $driver = Selenium::Firefox->new( marionette_enabled => 0 );
|
|
|
+ $driver->shutdown_binary;
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
@@ -226,6 +229,23 @@ up to 20 seconds:
|
|
|
|
|
|
See L<Selenium::CanStartBinary/startup_timeout> for more information.
|
|
|
|
|
|
+=method shutdown_binary
|
|
|
+
|
|
|
+Call this method instead of L<Selenium::Remote::Driver/quit> to ensure
|
|
|
+that the binary executable is also closed, instead of simply closing
|
|
|
+the browser itself. If the browser is still around, it will call
|
|
|
+C<quit> for you. After that, it will try to shutdown the browser
|
|
|
+binary by making a GET to /shutdown and on Windows, it will attempt to
|
|
|
+do a C<taskkill> on the binary CMD window.
|
|
|
+
|
|
|
+ $self->shutdown_binary;
|
|
|
+
|
|
|
+It doesn't take any arguments, and it doesn't return anything.
|
|
|
+
|
|
|
+We do our best to call this when the C<$driver> option goes out of
|
|
|
+scope, but if that happens during global destruction, there's nothing
|
|
|
+we can do.
|
|
|
+
|
|
|
=cut
|
|
|
|
|
|
1;
|