Create a Test Case for the GMO Web Application

You must configure the GMO Web application before performing this task.

When you record a test case with the Open Agent, Silk Test Classic creates locator keywords in an INC file to create scripts that use dynamic object recognition and window declarations. This test case will click the Enter GMO OnLine button in the GMO sample application.

  1. Click Record Testcase on the basic workflow bar. If the workflow bar is not visible, click Workflows > Basic to enable it. The Select Test Type dialog box opens.
  2. Select 4Test Testcase.
  3. Click OK. The Record Testcase dialog box opens.
  4. Type EnterGMOOnLine in the Testcase name text box.
  5. From the Application State list box, select DefaultBaseState to have the built-in recovery system restore the default base state before the test case begins executing.
  6. Click Start Recording. Silk Test Classic performs the following actions:
    • Closes the Record Testcase dialog box.
    • Starts your application, if it was not already running. If you have not configured the application yet, the Select Application dialog box opens and you can select the application that you want to test.
    • Removes the editor window from the display.
    • Displays the Recording window.
    • Waits for you to take further action.
  7. In the GMO Web application, click Enter GMO OnLine. As you interact with the application, Silk Test Classic displays your actions in the Recorder window.
  8. To stop recording, click Stop in the Recorder. Silk Test Classic displays the Record Testcase dialog box, which contains the code that has been recorded for you.
  9. To add the recorded interactions to a script, click Paste to Editor in the Record Testcase window. If you have interacted with objects in your application that have not been identified in your include files, the Update Files dialog box opens.
  10. Click Paste testcase and update window declaration(s) and then click OK. Silk Test Classic creates a new untitled 4Test script in the editor and pastes the actions you have recorded into this script.
  11. Choose File > Save to save the script. The Save As dialog box opens.
  12. In the File name text box, type SimpleBrowserTest and then click Save. The Add to Project dialog box opens, asking you if you want to add the script file to the project.
  13. Click Yes Silk Test Classic adds the file to the project scripts and updates the Files tree.
The generated test script should look similar to the following:
testcase EnterGMOOnLine ()
  recording
    WebBrowser.BrowserWindow.BSubmit.Click(MB_LEFT, 51, 20)
The location of the click may vary, depending on the resolution of your screen and the size of the browser window.