Explorar el Código

Added params error checking to S::R::WebElement->send_keys().

Eric Johnson hace 11 años
padre
commit
5813fdcb7f
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      lib/Selenium/Remote/WebElement.pm

+ 1 - 0
lib/Selenium/Remote/WebElement.pm

@@ -91,6 +91,7 @@ sub submit {
 
 sub send_keys {
     my ( $self, @strings ) = @_;
+    croak "no keys to send" unless scalar @strings >= 1;
     my $res = { 'command' => 'sendKeysToElement', 'id' => $self->id };
     map { $_ .= "" } @strings;
     my $params = {