Răsfoiți Sursa

Fix #141: cast height and width to integers

Daniel Gempesaw 11 ani în urmă
părinte
comite
b62dd7b675
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      lib/Selenium/Remote/Driver.pm

+ 2 - 0
lib/Selenium/Remote/Driver.pm

@@ -1584,6 +1584,8 @@ sub set_window_size {
     if ( not defined $height and not defined $width ) {
         croak "height & width of browser are required";
     }
+    $height += 0;
+    $width += 0;
     my $res = { 'command' => 'setWindowSize', 'window_handle' => $window };
     my $params = { 'height' => $height, 'width' => $width };
     my $ret = $self->_execute_command( $res, $params );