InternetExplorer.pm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package Selenium::InternetExplorer;
  2. use strict;
  3. use warnings;
  4. # ABSTRACT: A convenience package for creating a IE instance
  5. use Moo;
  6. extends 'Selenium::Remote::Driver';
  7. =head1 SYNOPSIS
  8. my $driver = Selenium::InternetExplorer->new;
  9. # when you're done
  10. $driver->shutdown_binary;
  11. =cut
  12. has '+browser_name' => (
  13. is => 'ro',
  14. default => sub { 'internet_explorer' }
  15. );
  16. has '+platform' => (
  17. is => 'ro',
  18. default => sub { 'WINDOWS' }
  19. );
  20. =method shutdown_binary
  21. Call this method instead of L<Selenium::Remote::Driver/quit> to ensure
  22. that the binary executable is also closed, instead of simply closing
  23. the browser itself. If the browser is still around, it will call
  24. C<quit> for you. After that, it will try to shutdown the browser
  25. binary by making a GET to /shutdown and on Windows, it will attempt to
  26. do a C<taskkill> on the binary CMD window.
  27. $self->shutdown_binary;
  28. It doesn't take any arguments, and it doesn't return anything.
  29. We do our best to call this when the C<$driver> option goes out of
  30. scope, but if that happens during global destruction, there's nothing
  31. we can do.
  32. =cut
  33. 1;