Understanding Opkey keywords

Keywords offer a set of predefined commands for creating test cases for any application. With keywords, you can easily write test steps with input and output data without the need for complex coding.  There are 700+ inbuilt keywords present in the Opkey library.

How to use Keywords?

Keywords are used by calling them in a test step and adding the input and expected output data values. If you want to capture the dynamic objects, you can also add properties of the object in the test object column. 

1. To add a new step in your  empty test case, you can click the Add Step or "+' button in the test case. 



2. Next, search the keyword you want to use by typing its name in the search box. All the keywords corresponding to the typed keyword are displayed in the dropdown list. You can select the desired keyword by clicking on the keyword from the dropdown. 

For example, we have searched Oracle in the search box and selected ClickByJavascript keyword from the dropdown as shown below. 




3. The selected keyword will be added to your test case step. You can follow the same steps to add any keyword in a test case. 


Adding a keyword in the middle of test case steps

If you have a test case where you want to add a new test step with a keyword, you can follow these steps.

1. Click to select the test step after which you want to insert the new step with the specified keyword. For example, in the test case given below, we want to add a new test step with a keyword after step 4.

.


2. Next, click the Add Step button on the top to add a new step. We can see in the image below, a new step is added after the step 4. 



3. To add any step in the end of test case, you can select the last step of test case and then click the Add Step button. However, to add a step in the beginning, you have to select the first step, add a new step after this, and then use the arrow key to move the new step in the beginning of test case. You can use these keys to select and move any step upwards or downwards in a test case.

Types of Opkey Keywords:

  1. Generic Keywords: Opkey generic keywords can be used to create a test script & execute it with a commercial tool by selecting the corresponding plug-in during run time. For Example SyncBrowser, SelectCheckBox, GetTableRowCount, etc.

  2. System Keywords: The System Keywords in Opkey are the pre-defined generic functions independent of the plugin used. For Example GetTimeAtTimeZone, StringContains.

  3. Control Flow Construct: Control flow construct keywords are responsible to execute certain sets of steps resulting in a choice. It contains the following categories: Comment, Condition, Iteration, and Obstruction. For Example: IF, Else, PauseExecution, StopExecution, etc.

  4. Selenium Webdriver Keywords: Selenium Webdriver keyword is used to execute suite by directly opening a web browser rather than running scripts within the browser. They work only with the Selenium webdriver as a plugin. For Example, GetSingleRowText, GetObjectProperty etc.

  5. Visual Plugin Keywords: Keywords in this tab are plug-in specific and they are used to test GUI using referenced images. They work only with Visual as a plugin. For Example: CompareImageObjects, Paste etc.

  6. Appium Keywords: These keywords are specifically used while using Appium as a plugin for mobile devices. For example: CloseApplication, DoubleTouch etc.

  7. Robotium Keywords: Keywords in this tab are plug-in specific and applicable on Android applications. For Example: ClickOnText, IsEditTextEmpty etc.

  8. ERP Specific keywords: These keywords are used in test cases for ERP applications. They are used specifically to capture dynamic objects the ERP application. For example, OracleFusion_ClickByText, Coupa_ClearTableCell, etc.



    You are at the end of this article.

    Click here to learn how to create a reusable component using keywords. 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article