Explorar o código

Fix use of shift on a ref (experimental) for inner_window

Daniel Gempesaw %!s(int64=11) %!d(string=hai) anos
pai
achega
35c18758a1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      lib/Selenium/Remote/Driver.pm

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

@@ -2281,7 +2281,8 @@ sub set_inner_window_size {
 
     $self->execute_script('window.open("' . $location . '", "_blank")');
     $self->close;
-    $self->switch_to_window(shift $self->get_window_handles);
+    my @handles = @{ $self->get_window_handles };
+    $self->switch_to_window(pop @handles);
 
     my @resize = (
         'window.innerHeight = ' . $height,