I have the following folder Layout
-- Keywords
-- Tests
-- MyTest.robot
-- PythonLibraries
-- MyPythonScript.py
-- Results
When i manually navigate to the PythonLibraries folder, and run the following command, my script works and the function runs as normal, taking the argument 'Test123'.
python -c 'import MyPythonScript; MyPythonScript.My_Function();' Test123
I am now trying to introduce this into the MyTest.robot in my RobotFramework using the Process Library. I have tried using both "Run Process" and "Start Process" with no luck. I know i need to include some configuration to point the script to my PythonLibraries folder. I also need to be able to take an argument, eg. Test123.
${result}= Start Process python cwd=${ROOT}/PythonLibraries -c 'import MyPythonScript; MyPythonScript.MyFunction();' Test123
I need help with the syntax of how to code this. The support online for this is limited unless you just want to print to the terminal, which isn't much help to me. Any help with this would be greatly appreciated.