We have already automated scenarios using python scripts(.py
). We would like to execute these scripts in Robot Framework. Is there any option to execute Python scri
You can use the run_process keyword from the process library. It returns an object that has the status code, stdout and stderr.
For example, this runs the script /tmp/helloworld.py:
# example.robot
*** Settings ***
| Library | Process
*** Test Cases ***
| Example of running a python script
| | ${result}= | run process | python | /tmp/helloworld.py
| | Should be equal as integers | ${result.rc} | 0
| | Should be equal as strings | ${result.stdout} | hello, world