Procházet zdrojové kódy

find child element(s) should use FINDERS when locating elements

Gordon Child před 14 roky
rodič
revize
5e5f48a4e1
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      lib/Selenium/Remote/Driver.pm

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

@@ -1226,7 +1226,7 @@ sub find_child_element {
     my $using = ( defined $method ) ? $method : 'xpath';
     if (exists FINDERS->{$using}) {
         my $res = { 'command' => 'findChildElement', 'id' => $elem->{id} };
-        my $params = { 'using' => $using, 'value' => $query };
+        my $params = { 'using' => FINDERS->{$using}, 'value' => $query };
         my $ret_data = eval {$self->_execute_command( $res, $params );};
         if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {
@@ -1282,7 +1282,7 @@ sub find_child_elements {
     my $using = ( defined $method ) ? $method : 'xpath';
     if (exists FINDERS->{$using}) {
         my $res = { 'command' => 'findChildElements', 'id' => $elem->{id} };
-        my $params = { 'using' => $using, 'value' => $query };
+        my $params = { 'using' => FINDERS->{$using}, 'value' => $query };
         my $ret_data = eval {$self->_execute_command( $res, $params );};
         if($@) {
           if($@ =~ /(An element could not be located on the page using the given search parameters)/) {