Run existing Selenium Script with Robot Framework


I have my existing Selenium TestNg Scripts which i would like to run through Robot Framework. I tried to find some solution but not able to get concrete information regarding same.

Can you please help me with some documentation/plugin/library through which i can execute my selenium scripts through Robot Framework.

Gaurav Sharma


You could use Process library to execute an external command.
TestNG is afaik java. so you want to call java -cp ".:../lib/*" org.testng.TestNG testng.xml or so.

And you could use XML library to parse the results from TestNG.

You could also try to use Java Remote Server or PyJnius to directly access java classes from python libraries.

But the big question would be if it is worth the effort.
Maybe easier would it be to just have both.

You can however achieve that for each TestNG Test there will be a Robot test in the logs but that would be very much effort.

Hi Rene,

Thanks for the valuable information, I went through the link that shared. So Pyjnius Library works like Reflection API in Java. If we have unknown super class then with this API Subclass can access all element of Super.
But in my case, if i use Pyjnius library to access any java super class elements then it will be in python and then only can get the element access not execution.

Also, not sure how it can be embedded in Robot Framework.

Could you share some document that can run these super classes from Robot itself.

Gaurav Sharma