Is there any way to hide the implementation of custom keywords from user in robot framework

written some keywords using robot framework and user should not see my implemented keywords and he needs to call it in test case for execution is this possible?

Never done this myself, but would you be looking at wanting to create your own PyPI package?

Other than that, I don’t really see the risk around testers seeing the implementation behind a keyword, if you’re worried of change to the keywords you can put the project in some form if source control.

But maybe there is a way to lock them down completely, can’t say I’ve really had a need or explored this.

Hi @Harsha,

Robot Framework is an interpreted language where the interpreter is written in Python, which is also an interpreted language by design.

  • So if your custom keyword library is in the form of a robot framework resource file of robot framework keywords then probably not.

  • If your custom keyword library is in the form of a python keyword library you might be able to apply one of the options in this stackoverflow thread:

  • Another option might be to create a dll using another programming language, then create a python wrapper keyword library that calls the functions in the dll see ctypes in Supported programming languages

I have no experience with any of this, as all my publicly available code is open source, so hopefully I’m pointing you in the right direction,


1 Like

Nice one Dave, pyInstaller didn’t even cross my mind for which I use with another project and have looked into a few others in that link you provided.

Not fun trying to decompile… :joy:

1 Like

Thanks Dave

1 Like

Hi Harsha

Just a heads up incase you fall upon using pyInstaller, the log, html files/folders for the reporting won’t be included in the output folder as well as other folder/files.

might save you some debugging time with the reporting one, if you was to use that approach, you’d just want to include them yourself by telling pyInstaller or just manually coping them across.

All the best