Opkey provides over 700 keywords for test cases, but sometimes custom ones are needed. Users can easily create and use custom keywords, an advanced feature of Opkey explained in detail in this article.
NOTE: To read how to create a Custom Keyword jar file, you can click here.
Here we will understand how to create a custom keyword and how we can use it in a test case.
Login to Opkey and select the Tools icon next to the Profile icon.
Select Keyword Management from the options.
A pop-up window opens. By default, the Manage Libraries tab is selected. Click on the + icon to add a new jar file in the library.
Select the jar file to be uploaded. Click Open. The file will be uploaded successfully.
Search for the uploaded library and click on the three dots next to the corresponding library.
View the options available. You can Export the file, update the file and delete the file.
Next on the pop-up window, select the Custom Keywords tab.
View the list of various custom keywords. Click on the ‘+’ icon to add a new custom keyword.
On the pop-up window, enter details of the keyword to be created. Mention Name, Plugin, Associated method, Output Type, Comment, Keyword description, Expected result.
Select a library to associate with the keyword.
Add an Input Argument with the ‘+’ icon. Here we are not adding any input argument.
You can see the keyword added to the list of existing keywords.
You can select multiple keywords and export using the Export selected keyword arrow.
Select any keyword to perform actions like Export keyword, Keyword used in module(find modules in which keyword is used), Update Keyword, and Delete Keyword.
Select a test case and search for the custom keyword you created.
The keyword is now available among the list of keywords. Click to add in a test case. Enter the required parameter and save.
You can now execute and view the output
You're now at the end of the article.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article