Rakesh Dommaraju
Rakesh Dommaraju

Reputation: 61

How to execute the simple python script from robot frame work

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

Upvotes: 2

Views: 7802

Answers (1)

Rakesh Dommaraju
Rakesh Dommaraju

Reputation: 61

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"

Upvotes: 3

Related Questions