Case study B: Recording and replaying with some adjustment
To adjust an existing script
- Start the KITE 4.0 application.
- Click Record.
- Select Record Internet Explorer > Firefox Script (TxP) from the list.
- To start recording the script, enter the Mid Tier URL in the dialog box and select OK.
- Select New Dynamic Page and select No.
- Enter your username and password.
This action triggers the completion of Action 1 in Script Viewer and the start of Action 2. - Select Login to continue to theMid Tierhome page.
On the Mid Tierhome page, use the mouse to highlight Service Request Management/Request Entry.
Notice that page completion does not occur.
- To open the form, select Request Entry.
The Script Viewer only reflects the page completion for Action 2 when the next action is taken, in this case, when selecting the Request Entry.
Selection of Request Entry is shown in the Script Viewer, by the start of Action 3 showing the Click on SPAN. - Select the search field and enter a search string that returns results that apply to your configuration environment.
In this example, the search string is simulation.
Action 3 page completes and Action 4 starts. - To start the search, select Go Search SRD.
The Script Viewer adds the search to Action 4. - When the search result is returned, select your search string result.
In this example, the search string result is Simulation SRD 1 with Mapping.
The Script Viewer shows the completion of Action 4 and the start of Action 5. - To start Action 6 and end Action 5, select Submit.
- Select a Request Name on the result page by selecting the down arrow.
In this example, the request name on the results page is SRD_10.
The Script Viewer records the arrow selection as the next action. Action 6 is ended and Action 7 is initiated as Click on DIV.
Selecting the SRD_10 request ends Action 7 and starts Action 8 as Click on NOBR. - To view the existing request, select Request Details.
The Request Details window opens and the Script Viewer adds this to Action 8 as Click on DIV. - Close the Request Details window.
The Script Viewer records this by ending Action 8 and starting Action 9. - Log out of the Mid Tier.
The Script Viewer records this as the completion of Action 9. - To end the script, click Stop.
To replay the recorded script
- Select Play in Internet Explorer.
Select Yes in the Save Changes dialog box and follow the on-screen instructions to save the script.
For this case study, the script is named Login_View-Existing-SRM_Logout.
- Observe the replay actions as they occur.
Action 7 does not turn green in Script Viewer, but instead stays brown. This indicates that the expected page completion event is not being met. The script will eventually time out with an Internet Explorer JavaScript error.
Issues
In case study B, an issue occurred during recording. The page completion event for Action 7 did not occur (Action 7 did not turn green) as expected. The brown color remaining for Action 7 indicates that the expected page completion event was not being met, and the script eventually times out with an Internet Explorer JavaScript error.
Case study B views the Request Details for Request SRD_10. However, this request is not initially displayed for selection. Clicking the down arrow to display SRD_10 led to page completion for Action 7, and started Action 8. However, during replay, this single click of the down arrow does not generate network traffic. Therefore, page completion criteria are not met. The script waits for network inactivity, but network activity never began.
The pink color for Action 7 shows that this is a record and replay issue. The solution for this issue is explained in the following section.
Solutions
For case study B, features in the Script Viewer and the Script Properties Editor can be used to edit the script so it runs properly. The failure starts in Action 7, based on its brown color, and eventually results in a timeout.
In case study B, the error occurs because the script is not receiving the page completion needed from Action 7. This error occurs because the following actions were all part of a single logical user action, which only viewed the details of a selected request:
- Click DIV for down arrow, in Action7
- Click NOBR for selecting SRD_10
- Click DIV for Request Details
To resolve the record and replay issue for case study B
- In the Script Viewer, right-click Click on DIV in Action 7, and select Move Down from the menu.
- Move Click on DIV to Action 8.
- Right-click Action 7, and select Delete from the menu.
- To confirm the deletion, select Yes in the dialog.
- Click Save and close the script.
- Replay the script.
The script runs successfully.
Summary
Record and replay issues are mainly due to actions that were recorded in a way that prevents successful replay. Using the Script Viewer and the Script Properties Editor, elements of the script were moved to make the script work. These issues and solutions are summarized in the following table.
Issue | Solution |
---|---|
The steps of a logical user action are put in separate script actions. | Make adjustments by grouping the script actions based on logical user actions. |
The actions which do not generate network activity are recorded in such a way that page completion is waiting for network inactivity. | Remove the action. |
The script elements are not in the right place. | Move elements up or down to make adjustments. |