I create a python file with the following content for my custom python library
from robot.libraries.BuiltIn import BuiltIn
def scroll_page_to_the_bottom():
BuiltIn().get_library_instance('AppiumLibrary').execute_script("mobile: scroll", {'direction': 'down'})
When I call from robot file with keyword scroll_page_to_the_bottom
I got an error TypeError: too many positional arguments
I try to use other mobile command without argument such as mobile: deviceInfo
and it works perfectly
Here is the working execute_script from my code
BuiltIn().get_library_instance('AppiumLibrary').execute_script("mobile: deviceInfo")
My question is how to pass command with argument to execute_script
?
referring to Execute Mobile Command - Appium, already use the correct format execute_script("mobile: scroll", {'direction': 'down'})
but got an error TypeError: too many positional arguments
from robot execution