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. To modify an application configuration that is associated with an entire project:
    1. Select ToolsEdit Application Configurations from the Silk Test Workbench menu. The Select Project dialog opens.
    2. Select the project from the list.
    3. Click Edit. The Edit Application Configurations dialog opens.
    4. Click Edit next to the appropriate application configuration
  2. To modify an application configuration that is associated with a specific visual test:
    1. Open the visual test.
    2. Click the <<Start>> step in the Task pane.
    3. Navigate to the Application Configurations category in the Properties pane.
    4. Click the application configuration that you want to modify.
    5. Click Edit Application Configuration.
  3. To modify an application configuration that is associated with a specific VB .NET script.
    1. Open the VB .NET script.
    2. Navigate to the Application Configurations category in the Properties pane.
    3. Double-click on the application configuration that you want to modify.
  4. Check the Execute Base State check box to use the base state with the application configuration.
  5. To test a web application or a mobile web application, select one of the installed browsers or mobile browsers from the list. You can also click Change to open the Select Application dialog box and then select the browser that you want to use.
  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. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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'].
  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 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. Silk Test Workbench 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.
  20. Click OK.
  21. 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.