Modifying the Base State from the User Interface

You can edit the base state from the user interface to specify how Silk Test Workbench starts an application under test (AUT) during recording and replay. You can specify the executable location of the AUT, the working directory, the URL and the connection string for a web application, and so on. For example, if you want to execute tests on a production web site, which have already been executed on a staging web site, you can simply change the URL in the base state and the tests are executed against the new web site.

Note: To specify how Silk Test Workbench starts an application under test (AUT) only for specific tests during replay, edit the base state in the script that contains the tests. For additional information, see Modifying the Base State in a Script.

To edit the base state through the user interface:

  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. To specify an executable, type the full path to the executable into the Executable field.
    Note: If you are testing a web application, and you want to specify an executable for the browser, select the custom browser type.
    For example, to start Mozilla Firefox, type C:\Program Files (x86)\Mozilla Firefox\firefox.exe.
  7. To specify command line arguments, type the arguments into the Command Line Arguments field.
    Note: If you are testing a web application, and you want to start a browser with command line arguments, select the custom browser type.
    For example, to start Mozilla Firefox with the profile myProfile, type -p myProfile.
  8. If you are testing an application which depends on a supplemental directory, specify the path to the directory in the Working directory filed.
    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, specify the main window of the application in the Locator field. For example, the locator might look like /Shell[@caption='Swt Test Application'].
  10. If you are testing a desktop application and you want to use an executable pattern, type the executable name and file path of the desktop application that you want to test into the Executable Pattern text box. For example, you might type *\calc.exe to specify the Calculator.
  11. If you are testing a desktop application and you want to use a command line pattern in combination with the executable file, type the command line pattern into the Command Line Pattern text box.
  12. If you are testing a web application, type the address of the web application into the Navigate to URL text box.
  13. 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.
  14. Optional: Select an Orientation for the browser window.
  15. 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.
  16. If you are testing a web application 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.
  17. If you are testing a mobile application or a web application on Apple Safari, type the connection string into the Connection String text box. For additional information, see Connection String.
  18. To edit the capabilities for a WebDriver-based browser, you can use the Connection String text box. For example, to start Google Chrome with a maximized browser window, type the following into the Connection String text box:
    "chromeOptions="
    + "{"
    + " \"args\":[ \"--start-maximized\"]"
    + "};"
    For additional information, see Setting Options and Capabilities for Web-Driver Based Browsers.
  19. 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.
  20. 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.
  21. Click OK.
  22. If the application under test usually takes a long time to start, increase the application ready timeout in the replay options.

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.