Forráskód Böngészése

Changed the variable used for cases when the method isn't defined

  - testing for failures will keep errors like these from occuring
Gordon Child 14 éve
szülő
commit
1f880ab6f2
1 módosított fájl, 4 hozzáadás és 4 törlés
  1. 4 4
      lib/Selenium/Remote/Driver.pm

+ 4 - 4
lib/Selenium/Remote/Driver.pm

@@ -1017,7 +1017,7 @@ sub find_element {
         if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {
             # give details on what element wasn't found
-            $@ = "$1: $query,$method";
+            $@ = "$1: $query,$using";
             croak $@;
           } else {
             # re throw if the exception wasn't what we expected
@@ -1068,7 +1068,7 @@ sub find_elements {
          if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {
             # give details on what element wasn't found
-            $@ = "$1: $query,$method";
+            $@ = "$1: $query,$using";
             croak $@;
           } else {
             # re throw if the exception wasn't what we expected
@@ -1128,7 +1128,7 @@ sub find_child_element {
         if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {
             # give details on what element wasn't found
-            $@ = "$1: $query,$method";
+            $@ = "$1: $query,$using";
             croak $@;
           } else {
             # re throw if the exception wasn't what we expected
@@ -1183,7 +1183,7 @@ sub find_child_elements {
         if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {
             # give details on what element wasn't found
-            $@ = "$1: $query,$method";
+            $@ = "$1: $query,$using";
             croak $@;
           } else {
             # re throw if the exception wasn't what we expected