Adding a Silk4NET Test to a Project

You can only add Silk4NET tests to an existing Silk4NET or Test project. If no Silk4NET or Test project exists, create a Silk4NET or Test project before you try to create a Silk4NET test.

  1. Click Silk4NET > New Test or Project > Add New Item .
    Note: If your solution contains more than one Silk4NET projects, select the project to which you want to add the new test from the list in the Project Selector.
    The Add New Item dialog box opens.
  2. Under Installed, click one of the following:
    • If your project is a Visual Basic project, click Common Items > Silk4NET Test.
    • If your project is a Visual C# project, click Visual C# Items > Silk4NET Test.
  3. Type a name for the test into the Name field and click Add.
    The Create a Silk4NET Test dialog box opens.
  4. Select how you want to create your Silk4NET test by clicking one of the following option buttons:
    Record a Silk4NET test
    Record actions and verifications against your application under test and generate a new test containing the recorded automation statements.
    Create an empty Silk4NET test
    Create an empty test that can be filled with automation statements later on.

    For the tutorial, click Create an empty Silk4NET test.

  5. Click OK.
  6. If you have selected to record a new Silk4NET test, the Select Application dialog box opens. Select the tab that corresponds to the type of application that you want to test:
    • 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.
  7. To test a standard application, if you have not set an application configuration for the current project, select the application from the list.
  8. 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.
  9. 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.
  10. Click OK. If you have selected an existing instance of Google Chrome on which you want to replay a test method, Silk4NET checks whether the automation support is included. If the automation support is not included, Silk4NET informs you that Google Chrome has to be restarted. The application and the Recording window open.
If you have selected to record the test, the recorded test is added to your project. If you have selected to add an empty test, an empty Silk4NET test is added to your project.
Note: You can also use the context menu in the Solution Explorer to add Silk4NET tests to your Silk4NET or Test project.