Implementing a Keyword in Silk4J

Before implementing a keyword, define the keyword as part of a keyword-driven test.

To implement a keyword for reuse in keyword-driven tests:

  1. Open a keyword-driven test that includes the keyword that you want to implement.
  2. In the Keyword-Driven Test Editor, click Implement Keyword to the left of the keyword that you want to implement. The Select Keyword Location dialog box opens.
  3. Click Select to select the package and class to which you want to add the keyword implementation.
  4. Optional: Define the package name for the new keyword implementation in the Package field.
  5. Define the class name for the new keyword implementation in the Class field.
  6. Click OK.
  7. Perform one of the following actions:
    • To record the keyword, click Yes.
    • To create an empty keyword method, click No.
  8. If you have set an application configuration for the current project and you are testing a Web application, the Select Browser dialog box opens. Select the browser on which you want to record the keyword.
  9. Click Record.
    For additional information on recording, see Recording a Keyword.

If an implemented keyword is displayed as not implemented in the Keywords window, check Project > Build Automatically in the Eclipse menu.