Ver Fonte

If are two arguments to the test method,

Assume the last argument is a test scription rather than a second argument.
Mark Stosberg há 12 anos atrás
pai
commit
2b6ac7d872
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      lib/Test/Selenium/Remote/Driver.pm

+ 3 - 1
lib/Test/Selenium/Remote/Driver.pm

@@ -84,7 +84,9 @@ sub AUTOLOAD {
 
         # make a subroutine for ok() around the selenium command
         $sub = sub {
-            my( $self, $arg1, $arg2, $name ) = @_;
+            my $self = shift;
+            my $name = pop;
+            my ($arg1, $arg2) = @_;
             if ($self->{default_names} and !defined $name) {
                 $name = $cmd;
                 $name .= ", $arg1" if defined $arg1;