Recording a Keyword-Driven Test in Silk4NET

Before you can create a keyword-driven test in Silk4NET, you have to select a project.

To record a single keyword, see Recording a Keyword.

To record a new keyword-driven test:

  1. Click Silk4NET > New Keyword-Driven Test. The Add New Item dialog box opens.
  2. Type a name for the test into the Name field and click Add.
    The Create a Silk4NET Test dialog box opens.
  3. Select Record a Silk4NET test and click OK.
  4. If you have not set an application configuration for the current project, select the tab that corresponds to the type of application that you are testing:
    • If you are testing a standard application that does not run in a browser, select the Windows tab.
    • If you are testing a web application or a mobile web application, select the Web tab.
    • If you are testing a native mobile application, select the Mobile tab.
  5. To test a standard application, select the application from the list.
  6. To test a web application or a mobile web application, if you have not set an application configuration for the current project, select one of the installed browsers or mobile browsers from the list.
    1. Specify the web page to open in the Enter URL to navigate text box. If an instance of the selected browser is already running, you can click Use URL from running browser to record against the URL currently displayed in the running browser instance. For the tutorial, select Internet Explorer and specify http://demo.borland.com/InsuranceWebExtJS/ in the Enter URL to navigate text box.
    2. Optional: If you want to test a web application on a desktop browser with a predefined browser size, select the browser size from the Browser size list.
      For example, to test a web application on Apple Safari and in a browser window which is as big as the screen of the Apple iPhone 7, select Apple iPhone 7 from the list.
    3. Optional: Select an Orientation for the browser window.
    4. Optional: Click Edit Browser Sizes to specify a new browser size and to select which browser sizes should be shown in the Browser size list.
  7. To test a native mobile application (app) if you have not set an application configuration for the current project:
    1. Select the mobile device, on which you want to test the app, from the list.
    2. Select the native mobile application.
      • If you want to install the app on the mobile device or emulator, click Browse to select the app file or enter the full path to the app file into the App file text field. Silk4NET supports HTTP and UNC formats for the path.
      • If you want to use an app that is already installed on an Android device, select the app from the Package/Activity list or specify the package and the activity in the Package/Activity field.
      • If you want to use an app that is already installed on an iOS device, specify the Bundle ID.
      • If you want to use an app that is available in UFT Mobile, specify the App identifier.
  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:
    1. Select the browser.
    2. Optional: If you want to test a web application on a desktop browser with a predefined browser size, select the browser size from the Browser size list.
      For example, to test a web application on Apple Safari and in a browser window which is as big as the screen of the Apple iPhone 7, select Apple iPhone 7 from the list.
    3. Optional: Select an Orientation for the browser window.
    4. Optional: Click Edit Browser Sizes to specify a new browser size and to select which browser sizes should be shown in the Browser size list.
  9. Depending on the dialog that is open, perform one of the following:
    • In the Select Application dialog box, click OK.
    • In the Select Browser dialog box, click Record.
  10. In the application under test, perform the actions that you want to include in the first keyword.
    For information about the actions available during recording, see Actions Available During Recording.
  11. To specify a name for the keyword, hover the mouse cursor over the keyword name in the Recording window and click Edit.
    Note: Silk4NET automatically adds the keyword Start application to the start of the keyword-driven test. In this keyword, the applications base state is executed to enable the test to replay correctly. For additional information on the base state, see Base State.
  12. Type a name for the keyword into the Keyword name field.
  13. Click OK.
  14. To record the actions for the next keyword, type a name for the new keyword into the New keyword name field and click Add. Silk4NET records any new actions into the new keyword.
  15. Create new keywords and record the actions for the keywords until you have recorded the entire keyword-driven test.
  16. Click Stop. The Record Complete dialog box opens.
Silk4NET creates the new keyword-driven test with all recorded keywords.