Managing Keywords in a Library

The Keywords page offers two different views in Tests > Libraries , depending on the selected object.

Library

If your selected object is a library, all keywords and keyword sequences within this library are listed. Libraries that contain uploaded keyword libraries are displayed with the symbol . The following actions are possible:
Task Steps
Implementing a keyword (adding code to be able to actually run the keyword in a test) Prerequisites: If your keyword contains parameters, you need to specify a value for each parameter before you implement the keyword.
  1. Click Implement with Silk Test (Implement with Silk Test) in the Actions column of the keyword that you want to implement.
    Note: If your browser reports a security warning for opening an external application, confirm the message.
  2. The Silk Test client opens. Refer to the Silk Test client documentation for detailed information.
  3. After having implemented a keyword, upload it back to Silk Central.
Editing an implemented keyword in Silk Test Click Open with Silk Test (Open with Silk Test) to open the keyword in the Silk Test client. Refer to the Silk Test client documentation for detailed information.
Converting a draft keyword to a keyword sequence (a keyword consisting of other keywords) Click Create Keyword Sequence in the Actions column of the keyword that you want to convert to a keyword sequence. The original keyword is then replaced by a keyword sequence with the same name and the keyword editor opens.
Converting a keyword sequence to a draft keyword If you accidentally created a keyword sequence, you may want to convert it back to a draft keyword. Click Convert to draft keyword (Convert to draft keyword) in the Actions column of the keyword sequence that you want to convert.
Note: Converting a keyword sequence to a draft will delete the sequence and all contained keywords. This action cannot be undone.
Editing a keyword sequence Click Go To to open the keyword sequence in the keyword editor.
Grouping keywords To better structure the keywords in a library, you can group them:
  • Silk Central keyword sequences can be placed in sub-folders. The folder names are reflected as group names and your keywords are grouped accordingly in the list.
  • Keyword groups of implemented keywords are defined in the implemented code. These group names are used by Silk Central and your keywords are grouped accordingly in the list.
Viewing tests and keyword sequences that reference a specific keyword or keyword sequence To view all tests and keyword sequences that reference a specific keyword or keyword sequence, select the appropriate entry in the keyword list and the Referenced By list will display all referencing keyword-driven tests and keyword sequences. Simply click the name to jump to the respective reference.
Replacing keywords in referencing tests and keyword sequences To replace references to the selected keyword or keyword sequence with another one, select the appropriate entry in the keyword list and use the Referenced By list to select the objects in which you want to replace the reference.
  1. Select the keyword or keyword sequence that you want to replace.
  2. In the Referenced By list, use Ctrl+Click or Shift+Click to select the objects in which you want to replace the reference.
  3. Right-click the selection and choose Replace keyword in selected reference(s). The Replace References dialog box appears.
  4. Select the keyword that you want to replace the current keyword with.
  5. If the selected keyword contains parameters, click Next, otherwise click OK and you are done.
  6. The parameters of the selected keyword are listed. For each parameter, select the matching parameter of the previous keyword, or enter a value.
  7. Click OK.

Keyword Sequence

If your selected object is a keyword sequence (a keyword consisting of other keywords), the Keywords page displays the keyword editor, which enables you to manage the keywords of the selected keyword sequence. The following actions are possible:
Task Steps
Opening a test or keyword sequence in Silk Test Click Open with Silk Test to open the selected test or keyword sequence in Silk Test.
Adding a keyword
  1. Click New Keyword at the bottom of the keywords list, or right-click a keyword and select Insert Keyword Above from the context menu.
    Note: You can let Silk Central recommend keywords based on their usage. Toggle the recommendations on or off with Enable Recommendations or Disable Recommendations in the context menu. For additional information, see Which Keywords Does Silk Central Recommend?.
  2. Select a keyword from the list of available keywords or type a new name to create a new keyword.
  3. Click Save.
Alternatively, double click an existing keyword in the All Keywords pane on the right or drag and drop it.
Tip: You can select multiple keywords with Ctrl+Click. When dropping them, they will be sorted in the order that you selected them in.
Deleting a keyword Click Delete in the Actions column of the keyword that you want to delete. Click Save.
Changing the order of keywords Drag and drop a keyword to the desired position. Click Save.
Creating a keyword sequence (a keyword consisting of other keywords)
  1. Select the keywords that you want to combine in the keywords list. Use Ctrl+Click or Shift+Click on the row number column to select multiple keywords.
  2. Right-click your selection and click Combine.
  3. Specify a Name and Description for the new keyword sequence.
Extracting keywords from a keyword sequence Right-click a keyword sequence and click Extract keywords. The original keyword sequence is then replaced by the keywords that it contained, but it is not removed from the library. Click Save.
Defining parameters for a keyword sequence
  1. Click Parameters above the keywords list. The Parameters dialog box appears.
  2. Click Add Parameter.
  3. Specify a Name for the new parameter. If the parameter is an outgoing parameter (delivers a value, instead of requiring an input value), check the Output checkbox.
  4. Click OK.
  5. Click Save.
Editing a draft keyword
  1. Click Edit in the Actions column of the draft keyword that you want to edit.
  2. Select a Group or specify a new group for the keyword.
  3. Type a Description for the keyword. This information is valuable for the engineer who will implement the keyword.
  4. Click OK.
  5. Optional: Click into a parameter field to add parameters for the keyword. If the keyword is implemented with Silk Test, these parameters will appear in the generated code stub.
  6. Click Save.
Searching for a keyword
Use the search field in the All Keywords pane on the right to find a specific keyword. When you enter alphanumeric characters, the list is dynamically updated with all existing matches. Tips for searching:
  • The search is case-insensitive: doAction will find doaction and DOAction.
  • Enter only capital letters to perform a so-called CamelCase search: ECD will find Enter Car Details, Enter Contact Details and EnterContactDetails.
  • Keyword and group names are considered: test will find all keywords that contain test and all keywords in groups where the group name contains test.
  • ? replaces 0-1 characters: user?test will find userTest and usersTest.
  • * replaces 0-n characters: my*keyword will find myKeyword, myNewKeyword and my_other_keyword.
  • <string>. only searches in group names: group. will find all keywords in groups where the group name contains group.
  • .<string> only searches in keyword names: .keyword will find all keywords that contain keyword.
  • <string>.<string> searches for a keyword in a specific group: group.word will find myKeyword in the group myGroup.
  • Use quotes to search for an exact match: 'Keyword' will find Keyword and MyKeyword, but not keyword.
Finding draft keywords in the library If you want to switch to the library that contains the draft keywords of your selected test or keyword sequence, click Draft keywords in the top right of the editor page.