example.pl 548 B

1234567891011121314151617
  1. use strict;
  2. use warnings;
  3. use Data::Dumper;
  4. use JSON::PP;
  5. use Playwright;
  6. my $handle = Playwright->new();
  7. #TODO in the future, we should coerce based on the JSON spec
  8. my $browser = $handle->launch( headless => JSON::PP::false, type => 'chrome' );
  9. my $page = $browser->newPage();
  10. my $res = $page->goto('http://google.com', { waitUntil => 'networkidle' });
  11. print Dumper($res->status(), $browser->version());
  12. my $frameset = $page->mainFrame();
  13. print Dumper($frameset->childFrames());
  14. my $inputs = $page->selectMulti('input');
  15. print Dumper($inputs);