Bläddra i källkod

Merge branch 'fix-send-keys-ok' of git://github.com/kablamo/Selenium-Remote-Driver into kablamo-fix-send-keys-ok

Daniel Gempesaw 11 år sedan
förälder
incheckning
43525543bc
2 ändrade filer med 2 tillägg och 0 borttagningar
  1. 1 0
      lib/Selenium/Remote/WebElement.pm
  2. 1 0
      lib/Test/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 = {

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

@@ -33,6 +33,7 @@ sub has_args {
     my $fun_name      = shift;
     my $hash_fun_args = {
         'get_attribute' => 1,
+        send_keys       => 1,
     };
     return ( $hash_fun_args->{$fun_name} // 0 );
 }