Parcourir la source

If are two arguments to the test method,

Assume the last argument is a test scription rather than a second argument.
Mark Stosberg il y a 12 ans
Parent
commit
2b6ac7d872
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  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;