diff --git a/pydoll/elements/mixins/find_elements_mixin.py b/pydoll/elements/mixins/find_elements_mixin.py index f8c8c7b4..b92a4ea2 100644 --- a/pydoll/elements/mixins/find_elements_mixin.py +++ b/pydoll/elements/mixins/find_elements_mixin.py @@ -403,8 +403,8 @@ def _get_find_element_command(self, by: By, value: str, object_id: str = ''): if object_id and not by == By.XPATH: script = Scripts.RELATIVE_QUERY_SELECTOR.replace('{selector}', selector) command = RuntimeCommands.call_function_on( - object_id, - script, + function_declaration=script, + object_id=object_id, return_by_value=False, ) elif by == By.XPATH: @@ -437,8 +437,8 @@ def _get_find_elements_command(self, by: By, value: str, object_id: str = ''): if object_id and not by == By.XPATH: script = Scripts.RELATIVE_QUERY_SELECTOR_ALL.replace('{selector}', escaped_value) command = RuntimeCommands.call_function_on( - object_id, - script, + function_declaration=script, + object_id=object_id, return_by_value=False, ) elif by == By.XPATH: @@ -461,8 +461,8 @@ def _get_find_element_by_xpath_command(self, xpath: str, object_id: str): escaped_value = self._ensure_relative_xpath(escaped_value) script = Scripts.FIND_RELATIVE_XPATH_ELEMENT.replace('{escaped_value}', escaped_value) command = RuntimeCommands.call_function_on( - object_id, - script, + function_declaration=script, + object_id=object_id, return_by_value=False, ) else: