Wrap .robot to .exe

Looking for a solution to wrap .robot framework to .exe as i am trying to develop an UI for business where they can select the application name from a dropdown and then the scripts will run in background.

Hi Srijit,

You probably want to read this thread first:

Dave.

1 Like

Nice one @damies13 I think I come across you’re comment on that post you linked when I started pondering and searching the forums/web if it was possible, and how to go about it… which the pyinstaller for which you mentioned was what I was looking for to get started :facepunch: – but there really ain’t much out there on making it into an .exe, without playing around yourself.

Hi Srijit,

I was able to do this with one of my own projects using pyinstaller: PyInstaller Manual — PyInstaller 5.7.0 documentation and I have a question layer using GitHub - CITGuru/PyInquirer: A Python module for common interactive command line user interfaces (there are other alternatives out there that I have played around with, but I just needed something simple) and then I’m using the library Rich: Introduction — Rich 12.6.0 documentation just to add some basic font color/styling to the.exe (nothing crazy, just some sutle font styling)

A few things to note that caused me a few problems at first, take note of the PyInquirer prompt_toolkit version, also your robot files and folders won’t automatically be moved over into the dist/main folder, you can either manually move them or pass them in the args when compiling with pyinstaller.

Another folder that you’d need to move across is the venv\Lib\site-packages\robot that generates the html reports, you’d just drop that into the dist\main\ folder for which pyinstaller creates.

But this is one of the few ways I’ve been able to achieve the question layer “UI layer” for what I have had a play around with, for a .exe on top of my RF project that can be run without the need for an IDE or any understanding of the code behind for a user wanting to run tests.

A little snippet from an example project I was playing around with which offers both application and web channels that make use of BrowserLibrary and SAPGuiLibrary for a POC:

Once all questions have been answered/option selected, you just pass the args as you would normally to the run_cli

Hope that gives you some options/ideas anyways and I guess ultimately you’d just need to switch out that question layer for a UI layer that more meets your needs :slight_smile:

1 Like