2

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

0

1 Answer 1

3

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"
Sign up to request clarification or add additional context in comments.

1 Comment

For completeness, I would like to add that you can also use the robotframework keyword 'Evaluate' for evaluating simple python expressions. link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.