KITE records many transaction scripts directly so that they can be used in testing without the need for additional work. Some scripts will require further work, however. This help topic explains some of the techniques that can be used to modify scripts for successful testing.
About script fields
- Any field that is named “Index” is 0-based, and refers to the index among elements of the same type (or when used in a search, among the matching results).
- Any field that is named “Label” usually refers to the display text of an element.
- Any field that is named “Value” usually refers to the VALUE attribute of the element.
- Windows are identified by a 0-based index. Frames are identified by a name and a 0-based index.
Use the Properties pane of KITE to edit your hidden script elements so the Keynote load agents will be able to play the script back consistently.
When the script is run, the Keynote load agents look for the Name of the edited hidden elements and use any Value for them that is written to the page.
If a form submission is recorded as a Submit type step, the hidden fields are not captured as (and do not need to be) part of the script, because the agent will automatically extract their values when the script is played back. However, if the submission is recorded as a “Navigate” step, then the hidden fields used during the recording are captured as part of the script. Any hidden field that is dynamic should be parametrized by using the Value corresponding to name variable option in the “Value” field.
Most e-businesses use HTML forms to gather user input. HTML forms are comprised of one or more INPUT elements such as INPUT text boxes, clickable radio buttons, multiple-choice check boxes, pull-down menus, and clickable images. For the various kinds of INPUT elements that your Web site may include, the KITE provides functions called variables for varying the input, which make your script more realistic. Other INPUT elements, such as the hidden INPUT element, need special handling by KITE so that the load agents are able to play back the script correctly. KITE provides function options for replacing recorded script elements that might not be playable otherwise.
The required ACTION attribute for an HTML form specifies the URL of the application that is to receive and process the form’s data. The other required attribute specifies the METHOD by which the browser sends the form’s data to the Web server for processing. There are two ways: the POST method and the GET method. The ACTION and METHOD attributes are both included within the initial FORM tag.
INPUT elements likely to be in your script are described in the table below. An example of HTML code for these kinds of elements is shown in Form Fields Example.
**HTML INPUT Element Types **
|check box||Creates a multi-value input area in the form.|
|file||Allows a file stored on the user’s computer to be returned with the form.|
|hidden||Allows embedded information into forms that can not be altered by the user. For example, session ids, which can be helpful to the Web server when sorting submitted forms. Sometimes nearly each INPUT tag in a form has a corresponding HIDDEN tag to give the Web server instructions on handling the user input. Since the purpose of this element is to report back to the Web server dynamic data, these elements must always be modified when included in your script. Instructions for doing this are given in Hidden Elements.|
|image button||Allows use of an image file as a button.|
|password||Causes the text input box to hide the value being entered.|
|radio button||Allows only one value to be selected and returned with the form.|
|reset button||Clears the form fields or resets them to their default values.|
|select||Creates either a pull-down or scrollable list in the form.|
|submit button||Sets in motion the form’s submission to the Web server from the browser.|
|textarea||Creates a multiline text-entry area in the form.|
This section includes two examples of HTML code:
Form fields example
This example Web page illustrates the INPUT, METHOD, ACTION, and event handler tags previously described. The ACTION tag references a phony URL. You can copy this text (starting with
<html> ), paste it into a Notepad document, save it as a html file, and open it in a browser. This is an example of a fairly simple HTML page with a form that has no elements needing extra steps in order for your script to be such that the load agents can play back consistently.
Hidden elements example
See also Hidden Elements.
Rollover images (that highlight when your mouse is over them) are actually made up of a pair of images. When you move your mouse over a rollover image, KITE captures the second image of the pair (the highlighted one), but the actual link’s destination is associated with the first image of the pair. Typically, these pairs of images have matched names such as something1.gif and something2.gif. When you verify those types of actions, the Edit Link box will display and suggest the image that has the actual link associated with it.
For example, you may roll your mouse over three roll-overs in a row, recording three Link actions, each with an image named something2.gif. As you verify, the Edit Link box will ask you to convert each something2.gif to a something1.gif. If you see this trend during verification, or if you know that your site uses roll-overs in a certain way, you can modify your script actions’ Label in the details pane (even before verifying) to be the correct Label.