Преглед изворни кода

Fix #141: cast height and width to integers

Daniel Gempesaw пре 11 година
родитељ
комит
b62dd7b675
1 измењених фајлова са 2 додато и 0 уклоњено
  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 );