Overview:
Custom Keywords are like OpKey keywords which are created by OpKey users to fulfill their requirement and do specific task during test automation. Once they are created, OpKey users can use them across their test cases and function libraries.
Need of Custom Keywords?
While performing test automation of an application, there may be few scenarios when you need to perform any specific task but unable to do. In such cases, you can create your own Custom Keywords.
Creating Custom Keywords in OpKey:
With the help of OpKey, you can easily handle the situation of Custom Keywords requirement. There are two methods which can be opted:
Method 1 –
Creating Coded Function Libraries and using them as an alternative of Custom Keywords
Now, OpKey users need not to write their Java code on an external code editor platform (like eclipse) because there is an advanced feature implemented with OpKey named as Coded Function Library. In fact, Coded Function Library is a better alternative solution of making Custom Keywords. Coded Function Library allows you to write your Java code in its code editor, compile & debug Java code. Once, your written Java Code has compiled successfully, save your Coded Function Library File and call it in your Function Library or Test Case, where it’s required. Execute your Function Library or Test case and analyze execution result. Thus, you don’t need to create a Jar file of your written Java code, upload it to OpKey cloud and make Custom Keyword by using it.
Method 2 –
Creating Custom Keywords and using them across Test Cases and Function Libraries
This method allows you to create your Custom Keywords and use them across the Test Cases and Function Libraries, as required.
Steps to be followed for creating Custom Keywords:


For example: We are uploading a library named as Custom_Screenshot.






Coded Function Library is a better alternative for creating Custom Keywords in OpKey. Here, you can write your Custom Keyword specific code in Java, compile it to fix code errors, associate required libraries, import pre-built libraries and execute it. Furthermore, this code can directly be called and used in a Test Case or a Function Library and get Executed. You can refer: Coded Function Library
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