问题
I am new to the python and Robot frame work. I have a python script at below location "C:\Python33\sample.py"
print ('Hello world')
I have installed the RF and I have a robot file (test.robot) at same location with below content.
# example.robot
*** Settings ***
| Library | Process
*** Test Cases ***
| | ${result}= | run process | python | /C:/Python33/sample.py
When I tried to execute the file from command prompt getting errors
C:\Python33>robot test.robot
Error: "Testcase name cannot be empty"
Please help me to fix this
回答1:
By modifying below code in robot file testcase is passing
*** Settings ***
| Library | Process
*** Test Cases ***
Using Kwargs
| | ${result}= | run process | python | "C:/Python33/sample.py"
来源:https://stackoverflow.com/questions/39524741/how-to-execute-the-simple-python-script-from-robot-frame-work