George S. Baugh 5 gadi atpakaļ
vecāks
revīzija
29382514af
2 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. 1 1
      example.pl
  2. 4 1
      lib/Playwright/Base.pm

+ 1 - 1
example.pl

@@ -14,4 +14,4 @@ print Dumper($res->status(), $browser->version());
 my $frameset = $page->mainFrame();
 print Dumper($frameset->childFrames());
 my $inputs = $page->selectMulti('input');
-print Dumper($inputs);
+print Dumper(map { $_->{guid} } @$inputs);

+ 4 - 1
lib/Playwright/Base.pm

@@ -64,7 +64,7 @@ sub new ($class, %options) {
             },
             as   => $renamed,
             into => $class,
-        }) unless $self->can($method);
+        }) unless $self->can($renamed);
     }
 
     return ($self);
@@ -72,6 +72,9 @@ sub new ($class, %options) {
 
 sub _request ($self, %args) {
     my $msg = Playwright::Util::request ('POST', 'command', $self->{port}, $self->{ua}, %args);
+
+    #TODO Check spec and see if we need to coerce a bool
+
     if (ref $msg eq 'ARRAY') {
         @$msg = map {
             my $subject = $_;