This functionality is supported only if you are using the Open Agent.
To record a single keyword, see
Recording a Keyword.
To record a new keyword-driven test:
-
In the workflow bar, click
Record Testcase.
The
Start Recording dialog box opens.
-
Select
Keyword-Driven Test.
-
Click
Yes to start recording the keyword-driven test.
-
Select the application state.
During the recording of a keyword-driven test,
Silk Test Classic generates a base state keyword with the same name as the application state that you have selected in the
Record Keyword-Driven Test dialog box. By default, the application state is the
DefaultBaseState.
Silk Test Classic inserts this base state keyword as the first keyword of the keyword-driven test.
-
Click
Start Recording.
-
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.
-
To test a standard application, select the application from the list.
-
To test a web application or a mobile web application, select one of the installed browsers or mobile browsers from the list.
-
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.
-
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.
-
Optional:
Select an
Orientation for the browser window.
-
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.
-
To test a native mobile application (app):
-
Select the mobile device, on which you want to test the app, from the list.
-
Click
Browse to select the app file or enter the full path to the app file into the
Mobile app file text field.
Silk Test Classic supports HTTP and UNC formats for the path.
Silk Test Classic installs the app on the mobile device or emulator.
-
If you have set an application configuration for the current project and you are testing a web application, the
Select Browser dialog box opens:
-
Select the browser.
-
Depending on the dialog that is open, perform one of the following:
- In the
Select Application dialog box, click
OK.
- In the
Select Browser dialog box, click
Record.
-
If you have defined a new application configuration, specify a name and location for the new frame file.
-
In the application under test, perform the actions that you want to include in the first keyword.
For information about the actions available during recording,
see
Actions Available During Recording.
-
To specify a name for the keyword, hover the mouse cursor over the keyword name in the
Recording window and click
Edit.
Note: Silk Test Classic automatically adds the keyword
Start application to the start of the keyword-driven test. In this keyword, the applications base state is executed to enable the test to replay
correctly. For additional information on the base state, see
Base State.
-
Type a name for the keyword into the
Keyword name field.
-
Click
OK.
-
To record the actions for the next keyword, type a name for the new keyword into the
New keyword name field and click
Add.
Silk Test Classic records any new actions into the new keyword.
-
Create new keywords and record the actions for the keywords until you have recorded the entire keyword-driven test.
-
Click
Stop.
The
Record Keyword-Driven Test dialog box opens.
-
Click
Paste to Editor.
The
Update Files dialog box opens.
-
Click
Paste testcase and update window declaration(s).
The
Save Keyword Implementation dialog box opens.
-
Select a file name and a location to save the implementation of the recorded keywords.
-
Click
Save.
Silk Test Classic creates the new keyword-driven test with all recorded keywords.