How to call the robot framework in MAC pC from Windows

Hi, I have setup robot framework in mac and now i am trying to run the tests from windows PC using fabric connection.

Can someone support me , how to call the scripts

Well, I don’t know what is this. I would use SSH that MacOS has or VNC (remote connection) also included in Mac.

But the best orchestration solution I know, is using Jenkins (you can set the Mac as a node/agent).

Thank you, I am using SSH

I am calling the .robot file from Windows but I am getting an error like filename is not found. But I have the file in the same location

Previously I used the same approach to call .py files, but with. .Robot I am facing issues

Best is to reference paths in RF using ${CURDIR} and always use / as path separator.

I am new to robot framework

my script is in the following path

python3 /Users/PycharmProjects/PythonProject/robotframework/Tests/Script.robot when i try to run this one from windows PC, i am getting syntax error

*** Settings ***
^
SyntaxError: invalid syntax

You have to install Robot Framework.

python3 -m pip install robotframework

Then you can run:

robot /Users/PycharmProjects/PythonProject/robotframework/Tests/Script.robot

But you need to read more documentation. Start by robotframework.org

Thanks, From windows PC command line i can be able to call the script on mac

cd /Users/PycharmProjects/PythonProject/robotframework/Tests/Script.robot

then python3 -m robot -s Script Script.robot # I just kept test case and test suite has same name.

with this its working. but when i try to run the same script using another application in windows PC then i am facing error like
[ ERROR ] Parsing ‘/Users/mac/Script.robot’ failed: File or directory to execute does not exist.
here i am trying run(cd /Users/PycharmProjects/PythonProject/robotframework/Tests)

run(python3 -m robot -s Script Script.robot)

You can see it is looking at the Home in Mac. You have to pass absolute path, or making sure your application run the commands in the same shell.

This was done in a different shell, and the next command will run in a new shell.

Okay shall i try like this as a single shell command below

run(cd /Users/PycharmProjects/PythonProject/robotframework/Tests -m robot -s Script Script.robot)

You must separate commands with ; to run in sequence, or with && meaning logical AND.

c.run(‘python3 /Users/mac658/PycharmProjects/PythonProject/robotframework/Tests && -m robot -s Script Script.robot’)

now i ‘m getting the below error, can you please guide me, what could be the issue here

can’t find ‘_main_’ module in ‘/Users/mac658/PycharmProjects/PythonProject/robotframework/Tests’

You have to be more careful with the commands.

You are trying to execute a directory.

c.run(‘cd /Users/mac658/PycharmProjects/PythonProject/robotframework/Tests && python3 -m robot -s Script Script.robot’)

1 Like