Skip to content

Commit 3c9c901

Browse files
authored
Merge pull request #162 from autoscrape-labs/fix/find-elements-relative
fix: fix call_function_on parameters order
2 parents 6511d0d + 194059e commit 3c9c901

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pydoll/elements/mixins/find_elements_mixin.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ def _get_find_element_command(self, by: By, value: str, object_id: str = ''):
403403
if object_id and not by == By.XPATH:
404404
script = Scripts.RELATIVE_QUERY_SELECTOR.replace('{selector}', selector)
405405
command = RuntimeCommands.call_function_on(
406-
object_id,
407-
script,
406+
function_declaration=script,
407+
object_id=object_id,
408408
return_by_value=False,
409409
)
410410
elif by == By.XPATH:
@@ -437,8 +437,8 @@ def _get_find_elements_command(self, by: By, value: str, object_id: str = ''):
437437
if object_id and not by == By.XPATH:
438438
script = Scripts.RELATIVE_QUERY_SELECTOR_ALL.replace('{selector}', escaped_value)
439439
command = RuntimeCommands.call_function_on(
440-
object_id,
441-
script,
440+
function_declaration=script,
441+
object_id=object_id,
442442
return_by_value=False,
443443
)
444444
elif by == By.XPATH:
@@ -461,8 +461,8 @@ def _get_find_element_by_xpath_command(self, xpath: str, object_id: str):
461461
escaped_value = self._ensure_relative_xpath(escaped_value)
462462
script = Scripts.FIND_RELATIVE_XPATH_ELEMENT.replace('{escaped_value}', escaped_value)
463463
command = RuntimeCommands.call_function_on(
464-
object_id,
465-
script,
464+
function_declaration=script,
465+
object_id=object_id,
466466
return_by_value=False,
467467
)
468468
else:

0 commit comments

Comments
 (0)