When you record a visual test,
Silk Test Workbench automatically identifies controls. When the visual test is recorded, you can change the controls that are used in the visual
test or manually insert additional test steps into the visual test. Use the
Identify Object dialog to identify non-visible controls, for example containers, in the application under test.
-
In the
Test Steps pane, select the step for which you want to change the control.
-
In the
Properties pane, expand the
Identify a control menu in the
Locator text box.
-
Select
Identify Object Dialog.
-
If you are testing a web application, the
Select Browser dialog box opens. Select the browser on which you want to identify the control and click
Start Identify.
The
Identify Object dialog box opens.
-
Click
Start Identify.
-
Move the cursor to the application that you are testing.
Controls appear highlighted as the cursor passes over them in the application. The related locator string or object map item
shows in the
Selected Locator text box.
-
Click the control that you want to use as it is highlighted.
-
Optional: Click
Show Locator Details to display the locator tree and any related attributes in the
Locator Attribute table.
-
Optional: You can replace a recorded locator attribute with another locator attribute from the
Locator Attribute table.
For example, your recorded locator might look like the following:
/BrowserApplication//BrowserWindow//input[@id='loginButton']
If you have a
textContents
Login listed in the
Locator Attribute table, you can manually change the locator to the following:
/BrowserApplication//BrowserWindow//input[@textContents='Login']
The new locator displays in the
Selected Locator text box.
-
Click
Test to verify that the locator recognizes the correct control.
-
To add a new step that uses the locator to the visual test, click
Paste.
The
Select Action dialog box opens. Select the action that should be performed against the control and click
OK.