Modifying the Base State

An application’s base state is the known, stable state that you expect the application to be in before each test begins execution.
  1. Open the visual test or the VB .NET script.
  2. For a visual test, click the <<Start>> step in the task pane.
  3. In the Properties pane, navigate to the Application Configurations category.
  4. Select the application configuration that you want to modify.
    • For a visual test, click into the application configuration that you want to modify and click Edit application configuration.
    • For a VB .NET script, double-click on the application configuration that you want to modify.
    The Edit Application Configuration dialog box opens.
  5. Check the Execute Base State check box to use the base state with the application configuration.
  6. If you are testing a desktop application, type the executable name and file path of the desktop application that you want to test into the Executable field. For example, you might type *\calc.exe to specify the Calculator.
  7. If you are using a desktop application, use the Command Line Arguments field to specify any command line arguments that you want to pass to the application when it is launched by the base state.
  8. If you are testing a desktop application which depends on a supplemental directory, specify a directory in the Working directory text box.
    For example, if you use a batch file to start a Java application, the batch file may reference a JAR file that relies on a relative path. In this case, specify a working directory to reconcile the relative path.
  9. If you are testing a desktop application, edit the Locator to specify the main window of the application. For example, the locator might look like /Shell[@caption='Swt Test Application'].
  10. If you are testing a web site, type the address of the web application that you want to test into the Url to navigate text box.
  11. If you are testing a web site and you want to change the default browser, click Change to open the Select Application dialog box and then select the browser that you want to use.
  12. If you are testing a web site or a mobile native application on a remote location, for example on a mobile device that is connected to a Mac, and you want to edit the remote location, click Change to open the Select Application dialog box and then click Edit Remote Locations.
  13. If you are testing a mobile native application, specify the name of the mobile application that you want to test in the Mobile app text box.
  14. Modify the Timeout to specify the number of milliseconds that Silk Test Workbench waits for the application to be ready and running when the base state is executed. If the application is not ready and running when the time expires, the process times out.
  15. Click OK.

Executing the base state starts the application if it is not already running. If the application is already running, Silk Test Workbench does not start another instance of the application.

If your test includes multiple application configurations and you are modifying an application or Web page other than the object associated with the base state, you can turn off the base state. This indicates that the base state will not be used for recording or replaying the modifications. Therefore, you must record the steps to launch the application or Web page within your test. For instance, if you want to test a Web page, start Internet Explorer within your test.

Note: Do not add more than one browser application configuration when testing a web application with a defined base state.