Web recorder actions

A web recorder transaction consists of a series of actions, further grouped into steps. Going to a new web page creates a new step. The actions created for desktop or mobile web recorder transactions are described below.

Actions

Navigate

The Navigate action is always the first action of a transaction and opens the specified URL in a browser window.

Going to a new web page by clicking a link in the current web page creates a Click action, not a Navigate action. 

Note

You cannot create a Navigate action by typing an new URL in the address bar; if you enter a URL while recording a script and perform an action on the new page, the script fails during playback as there is no Navigate action taking you to that page.

This action is created in desktop transactions; the Tap action is created instead in mobile transactions.

Click

The Click action registers and performs a mouse click on a link, button, a radio button option, inside a field, etc.

Going to a new web page by clicking a link in the current web page creates a Click action, not a Navigate action.

This action is created in both desktop and mobile transactions.

If your test requires a cookie with the same value for every run, you can insert a Cookie action after recording your script to provide that value at the appropriate point.

For example, your website may deliver content tailored differently for first-time versus return visitors. In the first visit, a cookie is downloaded so the visitor is identified in future visits as a return visitor and the “first-time” content is not displayed. Keynote Synthetic tests, however, clear the browser cache and delete cookies before each test run; every test run is a “first-time visitor.” To make the test simulate a return visit, you can add a Cookie action to identify each run as a return visit.

To add a Cookie action:

  1. After recording your script, click the sign that appears between steps in the transaction summary.

  2. Click OK in the dialog box that appears.

  3. Fill out the options in the Cookie action. The URL field is optional; however, if you want to delete the same cookie later in the script by inserting another Cookie action, the URL field must be filled out.

  4. Save your changes and click Back to Transaction to view your transaction summary again.

    This action is created in both desktop and mobile transactions.

The Cookie action has no Advanced Options.

Keystrokes

The Keystrokes action captures the text string you type into a field on a web page.

The string is recorded in the Text value option and can be edited. Even if you choose auto-complete text during recording, Text value displays the complete text string to be entered into the field.

When you type text in a masked field (e.g., a password), the Text Value field is automatically encrypted for display in the UI. Clicking the lock icon  below a captured password encrypts the field saved to the script file.

You can also manually encrypt text in any other field. When you click the lock icon  below a text field to encrypt the content, the text is replaced by a row of dots. To undo encryption, click the lock icon again. 

This action is created in both desktop and mobile transactions.

Select option

The Select action records an item selected from a drop-down list on a web page. This action is added when you use keystrokes or a mouse click to select a list item. 

This action is created in both desktop and mobile transactions.

Rotate

This action is only available in mobile transactions and simulates changing the orientation of a mobile device in a clockwise or counter clockwise direction. 

To insert a Rotate action while recording: 

  1. Click the Keynote extension logo in the browser address bar.

  2. Click an icon to change device orientation (select Rotate Device Clockwise or Rotate Device Counterclockwise).

    The device screen in the recording window changes its orientation.

Tap

This action is only available in mobile transactions and defines where to record tapping a mobile screen with a fingertip, e.g., to click on a link, select a radio button, or set focus in a form field. In the recording window, the cursor changes to an icon that represents a fingertip .

Common options

Wait

The web recorder automatically includes a wait statement at the end of each step, i.e., in the final action of a step. The wait statement functions as a completion event. To edit a wait statement, click Edit next to the Wait time rule > select a wait option from the drop-down list > Save Rule Changes.

The wait option is available for Navigate, Click, KeystrokesSelect Option, and Tap actions.

The Wait time setting has the following options: 

Web Recorder Setting Description
For page to load completely Checks for browser download cycles. One download cycle is essentially when a page has finished loading.
For background network activity to complete Checks for a lack of HTTP message downloads (HTTP inactivity) for a specific duration.
For a specific period of time—if you select this option, you must specify the number of milliseconds to wait. This completion event is a timer which begins once all of the actions for the page have been executed. 

For desktop (TxP) web recorder scripts, these wait options are supported for web recorder playback as well as in scripts deployed on agents.

For mobile (MWP) web recorder scripts, these wait options are supported for web recorder playback only. Scripts deployed on agents have a default combination completion event consisting of one download cycle and 2000 ms of HTTP inactivity. This cannot be changed.

Page.setEndOfPageOnEndDOMMessage( 1 );
Page.setEndOfPageOnHTTPInactivity( 2000 );

Validation

Validation rules enable you to specify page text that must or must not be matched for an action to be successful. You can define validation rules for each action; at the least, we recommend setting up validation for the final action of a step to set up an expected result for page verification.

Validation is available for Navigate, Click, Keystrokes, Select Option, and Tap actions.

  1. Navigate to the action details of your action and click Add Custom Validation.

  2. Enter and save validation rule details.

    1. Enter the text to be matched (Specify text).

    2. Specify if the text should not be found on a correctly loaded page (Fail if this text is located in this action).

    3. Specify is the text case should be matched exactly as entered (Case sensitive match).

    4. Click Save Validation Rule Changes.

  3. You can set up more than one validation rule per action. When you have saved validation rules, you can use the arrow buttons next to them to specify the order in which they must be processed; you can also delete or edit any rule you set up.

Validation failure in web recorder playback generally causes script failure at a subsequent step (see the screenshot below). Validation failure in a provisioned measurement triggers the “Search Content Failed” (93010) error for mobile scripts and “Missing Keyword” (-99100) or “Error Text Found” (-99101) errors for desktop scripts in MyKeynote results.

Target window

The Target window in Advanced Options identifies the window and/or frame containing the element with which an action should interact. The default value for the target window is gomez_top[0] , which specifies the first window that opens when you begin a transaction.

Pop-up windows are referenced as additional “top” windows. For example, the first pop-up is gomez_top[1] and the second  is gomez_top[2].

Frames are referenced with a “frame” index added to the target window name. For example, if the target was the first frame on the first window, it is gomez_top[0].frames[0]. The second frame on that window is gomez_top[0].frames[1].

The ClickSelect OptionKeystrokes, and Tap actions display the target window setting. In the mobile web recorder, the target window setting is not used in scripts deployed on agents.

Locators

Locators in Advanced Options define the location of the target element on a web page. Locators provide the agent with a means of finding the element. Locators can be in either DOM or CSS-selector format. DOM locators search for an element in DOM of a web page. CSS selector locators are based on the Sizzle selector library included in jQuery. For more information, see Element Locators.

The ClickSelect OptionKeystrokes, and Tap actions display locator settings. 

Several locators are captured per element. You can also create additional locators (Add Locator) if, for example, an element has a dynamic ID. Use the arrow buttons next to locators to specify the order in which locators must be processed.

For desktop (TxP) web recorder scripts, locators are used for web recorder playback as well as in scripts deployed on agents.

For mobile (MWP) web recorder scripts, these locators are supported for web recorder playback only. Scripts deployed on agents use the Keynote mobile rules to locate and interact with an element.

Offsets

The X and Y offset fields in Advanced Options define the coordinates of the element relative to the upper-left corner of the screen. 

Offset settings are only available for Click actions.

Offset coordinates are currently only supported for web recorder playback, not scripts deployed on agents; any changes you make to offsets only impacts the script played back in the web recorder, not the script deployed on the agent.

Additional Keynote mobile rules

Mobile web recorder scripts deployed on agents use these rules to locate an element to interact with. However, these rules are not used during playback of mobile scripts in the web recorder; locators are used instead. 

In mobile web recorder scripts, the ClickSelect Option, and Keystrokes actions display additional Keynote mobile rules for to describe an element and its parent.