Recording 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 Record a Silk4NET test and click OK.
  5. 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.
  6. To test a standard application, select the application from the list.
  7. 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.
  8. 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.
  9. 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.
  10. Perform the interactions, which you want to record, with your application under test.
    For additional information about recording a mobile application, see Recording Mobile Applications. For information about the actions available during recording, see Actions Available During Recording.
  11. When you are finished with recording, click Stop. The Recording Complete dialog box opens. From this dialog box, you can click Playback to replay the recorded test.
    • If you are using Visual Studio 2010, you can also access the Test View in Visual Studio, where you can replay and manage your tests.
    • If you are using Visual Studio 2012 or later, you can also access the Test Explorer in Visual Studio, where you can replay and manage your tests.
The recorded interactions are added as a file to your project. The default file name of the generated file is UnitTest<Index>.cs or UnitTest<Index>.vb, depending on the default programming language of your project. For example, if you are recording the first test for a Visual Basic project, the name of the generated file is UnitTest1.vb
Note: You can also create a new project and record the new test into the new project.