Explorar o código

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

Eric Johnson %!s(int64=11) %!d(string=hai) anos
pai
achega
5813fdcb7f
Modificáronse 1 ficheiros con 1 adicións e 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 = {