Creating a Silk4NET Project

  1. Click Silk4NET > New Project or File > New Project . The New Project dialog box displays.
  2. Under Installed > Templates, click Visual Basic or Visual C#, select Test and then select Silk4NET Project.
  3. Type a name for the project into the Name field. For the tutorial, type Tutorial.
  4. Optional: Type a name for the solution into the Solution field.
  5. Click OK. The Project Created dialog box opens.
  6. Click Yes to start recording a new test or click No to create an empty project. For the tutorial, click No. If you have selected to start recording, the Add New Item dialog box opens.
  7. In the Add New Item dialog box, select which type of test you want to record.
    • To bundle the recorded actions into one or more keywords, select Silk4NET Keyword-Driven Test.
    • To record the test without creating keywords, select Silk4NET Test.
  8. If you have selected to start recording, type a name for the new test into the Name text box in the Add New Item dialog box.
  9. Click Add.
  10. 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.
  11. To test a standard application, if you have not set an application configuration for the current project, select the application from the list.
  12. 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.
  13. 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. Click Browse to select the app file or enter the full path to the app file into the Mobile app file text field. Silk4NET supports HTTP and UNC formats for the path. Silk4NET installs the app on the mobile device or emulator.
  14. 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 create an empty Silk4NET test, a new solution containing the Silk4NET project is created. Additionally, a Silk4NET test is created in the project with the following language-specific file name:
  • UnitTest1.vb
  • UnitTest1.cs
Note: You can also use the context menu in the Solution Explorer to add Silk4NET projects to an existing solution.