test-firefox.test 600 B

1234567891011121314151617181920212223242526
  1. use strict;
  2. use warnings;
  3. use Test::Selenium::Firefox;
  4. use Test::More tests => 3;
  5. use Test::Fatal;
  6. my $driver;
  7. is( exception { $driver = Test::Selenium::Firefox->new(
  8. extra_capabilities => {
  9. 'moz:firefoxOptions' => {
  10. args => [ '-headless' ],
  11. },
  12. },
  13. ); }, undef, "can spawn new Selenium::Firefox");
  14. $driver->get('http://google.com');
  15. TODO: {
  16. local $TODO = "This test must fail";
  17. $driver->click_ok('not_here','css',"click on non-existant element doesn't croak");
  18. };
  19. is( exception { $driver->shutdown_binary; }, undef, "can shutdown binary correctly");