1
0
Эх сурвалжийг харах

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

Gordon Child 14 жил өмнө
parent
commit
5e5f48a4e1

+ 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)/) {