I am fairly new to Robot Framework. I am trying to run the following code using Ride IDE but facing issues. Could someone kindly help me on how to get this done.
Code:
*** Settings ***
*** Variables ***
*** Test Cases ***
Setting Variables
#| Example of running a python script
${result}= run process | python | C:\Users\name\Desktop\hello.py
#| | Should be equal as integers | ${result.rc} | 0
#| | Should be equal as strings | ${result.stdout} | Hello World
*** Keywords ***
I still think you should include more details in your question, namely:
hello.py
Nevertheless, I think your problem will be somewhere around these:
1/ Your Settings section is empty, but you need
Process
library in order to executeRun Process
keyword.2/ Your
hello.py
is wrong, doesn't return and print what you think it does.3/ You absolute path is wrong, the python file resides somewhere else.
4/ You're missing some modules you need in order to execute RF scripts. Please search on this site, similar question about missing modules has been asked many times.
All in all, the whole runnable example (provided you have all the prerequisites installed) would be:
It's a good practice not to use absolute paths, so I refer to
hello.py
differently. The content of the file is:hello.py