Resource Files in Robot Framework

  • The Resource files provide a mechanism for sharing user keywords and variables
  • It is easy to create these resources
  • The resources can be imported by using the settings in the settings table

Now, open the Ride editor and right-click on the project Demo and then select the New Resource


Enter the resource name as Userdefinedkeywords and select the TXT format and then click on Ok button


Once the resource has been created successfully, then it will be displayed on the left side corner.


Now, right-click on the Resource and create a scalar variable ${var1} and give the value as 4



Create another scalar variable as ${cmp2} and pass the value as ten only.


And define a keyword by right-clicking on the Userdefinedkeywords file and select the new user define keyword, and give the name as Comparevariables and click ok.



And find the keyword Should Be Equal As Integer and pass the new scalar variables


Create a new test case as TC06 and then try to use the keyword Comparevariables; it will not show any keywords, this is because we have not imported the resources file over here.


Click on Save all, and then open the test suite and click on the Resource, the resource page will open and select the browser and select the userdefinedkeywords.txt file and click ok



You can see the userdefinedkeyword is displayed in the test suite


Now, open the TC06 test case and try to find the Comparevariable keyword by pressing ctrl+alt+space, you will find the keyword


Now select the test case and click on the Run and then click on the start button, the output is:


Developer Tools in Robot Framework

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions