build_selenium_spec.pl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/perl
  2. package Bin::build_selenium_spec;
  3. #ABSTRACT: Convenience script to fetch the selenium specification from WC3
  4. use strict;
  5. use warnings;
  6. no warnings 'experimental';
  7. use feature qw/signatures/;
  8. use Getopt::Long qw{GetOptionsFromArray};
  9. use Pod::Usage;
  10. use Selenium::Specification;
  11. exit main(@ARGV) unless caller;
  12. sub main(@args) {
  13. my %options;
  14. GetOptionsFromArray(\@args,
  15. 'verbose' => \$options{verbose},
  16. 'dir=s' => \$options{dir},
  17. 'force' => \$options{force},
  18. 'help' => \$options{help},
  19. );
  20. return pod2usage(verbose => 2, noperldoc => 1) if $options{help};
  21. Selenium::Specification::fetch(%options);
  22. }
  23. 1;
  24. __END__
  25. =head1 build_selenium_spec.pl
  26. Fetches the latest versions of the Selenium specification(s) from the internet and stores them in
  27. ~/.selenium/specs
  28. As a variety of JSON files.
  29. =head1 USAGE
  30. =head2 -h --help
  31. Print this message
  32. =head2 -v, --verbose
  33. Print messages rather than being silent
  34. =head2 -d --dir $DIR
  35. Put the files in a different directory than the default.
  36. =head2 -f --force
  37. Force a re-fetch even if your copy is newer than that available online.
  38. Use to correct corrupted specs.