Run Python Code

I have a Python automation framework already built to suit my automation requirements in my project. Includes stuff like execution of automated tests in a data-driver manner while also creating test suites and test sets for different requirements for execution. However I’d like to include execution of some browser / website tests using UiPath through the same framework. Is there any ready Python API or at least a Command line API that I could use?

I am a newbie to UiPath. I’ve downloaded the trial version and tried to write a few scripts in the Studio. Haven’t tried other modules of UiPath like Orchestrator or Robot. So if someone can even point me in the right direction for my problem, I’d really appreciate it.

There is not a native Python integration in UiPath. However, you can still execute Windows command using batch files. So you could write a batch script that executes your Python code.

Or (what I have done in the past), you can compile your Python code using PyInstaller and then run the .exe file.

I think the question got misinterpreted.
I wish to execute UiPath tests from my Python code, not the other way around. So I would like to run something like:

python UiPath_test1.ui where the UiPath_test1.ui script is my UiPath script that can be executed from a command prompt or from Python chevron prompt.

Unfortunately Sumeet you cannot do that. UiPath is built on top of Microsoft Workflow foundation framework and uses more sophisticated .xaml (WPF). Ironpython at the moment supports Xaml but cannot compile and run WF created Xaml. the extension of Uipath code is .xaml like Main.xaml. you can find that as below

You can try to investigate more by opening that in Notepad++ and see if there is a way to call and compile code using Python. But I would strongly suggest use to UiRobot.
you can go through their docs for that

Hi Sumeet,

You can use Orchestrator to start a process remotely either on demand or by a schedule.
There is a free course in UiPath Academy where you can find out how to use Orchestrator and there is also a community edition available.
Also, Orchestrator exposes a REST API which can be used to trigger the execution of a process from another tool, like your Python automation framework.

Thank you for the direct link to UiPath Robot.

Thank you for the direct link to the Orchestrator and REST API. So I have 2 questions arising out of your answer:

  1. You said Orchestrator and then mentioned ‘there is also the community edition’. Does that mean that the Community edition - the free one - doesn’t have Orchestrator module?
  2. So just to be clear, I’d have to prepare Orchestrator jobs to run my UiPath scripts and then I’ll have to call these Orchestrator jobs using the REST API?


UiPath provides the demo Orchestrator with community edition but you have to register as a tenant to access it UiPath Orchestrator


1 Like

Maybe there will encounter a publish error like : ‘the package is too large’ .
so My suggestion is somethings like below:
1.install Ui Path platform instead of commnity version
2.Go to MyGet to creat your feed
3.Create tenant in
4.rewrite your Orchestrator setting like
Deployment URL: the feed name you created at step2
API Key: API key of your MyGet feed
5.To Publish a project


I am a beginner in UiPath. So my questions might seem odd.
All above responses indicate that if I have to use a Community Version of UiPath, I will not be able to execute the tests locally? I will have to publish my project so that the entire project is like writing in GitHUB or something like that and then use the Orchestrator feed to run Robots for execution of my scripts?
So if I install community version, is there no way to execute my UiPath projects locally?

Locally,you can execute your projects through UiRobot by using some “bat” command like:

C:\Users{your name}\AppData\Local\UiPath\app-18.1.2\UiRobot.exe
-file:“D:\UiPath\InputArgument\Main.xaml” -input:{“inputValue”:“helloworld”}

A post was split to a new topic: How to execute Python script?



How can i use this…
Is there any sample workflow that i can start with?

Hi, Did u get your script running?
I am actually using Run Python Script inside the Python scope - but getting exceptions as it doesn’t seem to find a file… thanks!

This usually works if you use 32-bit python…
you have to just pass path of that into python scope…for e.g. “c:\python-32bit” the folder where 32 bit python.exe resides and then you are able to run python scripts.
Also make sure that you have set path of 32 bit python in environment variables in system properties of windows.

1 Like

Here is an example:


A post was split to a new topic: Run projects with Orchestrator CE

does this work with pandas framework too? As I cannot invoke it with the 32-bit invoke code activity.

I’ve used pandas by running a python file within an Anaconda environment.
If you are unfamiliar with anaconda: