Share this page

# Click & Script tips and known issues

Caution: Click & Script protocols are supported for replay only. Support for these protocols will be discontinued in a future version.

We recommend that you migrate existing Ajax Click & Script scripts to another web protocol such as TruClient - Web (see TruClient - Web protocol) or Web - HTTP/HTML (see Web - HTTP/HTML protocol).

Note: Some of the items below apply to specific Click & Script protocols only.

In this topic:

## Replay tips

This section lists tips for replaying Click & Script Vuser scripts.

### Do not re-order statements in a recorded script

Do not change the order of the statements within a recorded script. Also, copying segments of code from one Action to another is not recommended.

### Convert non-ASCII characters

If your links contain non-ASCII characters, you should instruct VuGen to convert the data to or from the UTF-8 format.

To enable UTF-8 conversion:

1. Select Replay > Runtime Settings and select the Internet Protocol > Preferences node.

2. Click Options to open the Advanced Options dialog box.

3. Locate the Convert from/to UTF-8 option and set it to Yes.

Alternatively, view the list of options that is displayed when a link is not found. Enter the displayed text as-is, such as the hex escape sequences \xA0 or any other non-standard format.

### Run the same sequence of actions twice

In some cases, you can perform a certain process only once—such as deleting a user from the database. Replay will fail after the first iteration because the action is no longer valid. Verify that your business process can be repeated more than once with the same data.

### Set unique image properties

In the Step Navigator, double click on the previous image step to open its properties. If the Id, Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.

Alternatively, you can add an Ordinal argument to specify the occurrence number of the image on that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference.

### Check the step's description

If you receive a GUI Object is not found error, check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.

There are several solutions:

- If the new value is stable, open the script in the Editor and manually modify the value of the step's DESCRIPTION argument.

- If the description changes from run to run, you can use a regular expression in the DESCRIPTION argument.

- Alternatively, replace the problematic object description property, such as Name, with the Ordinal property.

For more information, see the Function Reference.

### ThreadingModel

Replay of COM script in VuGen fails when the dll registration is missing the >ThreadingModel string under the >InprocServer32 folder of the GUID.

### Search for warnings

Search for warnings or alerts in the Output pane.

### Verify the response

Verify the response of the previous step is correct using web_reg_find. For more information, see the Function Reference.

### Use Alternate Navigation

For problematic steps or those using Java applets, use Alternative Navigation to replace the web step with an HTTP level step. Note that the HTTP level steps may require manual correlations. To perform Alternative Navigation, select a step in the Step Navigator, or the text in Script View, and select Replace with alternative navigation from the right-click menu.

### Supported environments

- ActiveX objects and Java applets are only supported on Windows platforms.
- Not supported for Macromedia Flash or VB Script.
- Click & script protocols do not support pop-up windows.

## API tips

This section lists general notes about the web functions.

### Regular expressions

You can specify a regular expression for most object descriptions, by preceding the text with "/RE" before the equals sign. For example:

    web_text_link("Manage Assets",
            DESCRIPTION,
            "Text/RE=(Manage Assets)|(Configure Assets)",
            ACTION,
            "UserAction=Click",
            LAST);

For more information, see the Function Reference.

### Ordinals

The Ordinal attribute is a one-based index to distinguish between multiple occurrences of objects with identical descriptions. In the following example, the two recorded web_text_link functions have identical arguments, except for the ordinal. The ordinal value of 2, indicates the second occurrence.

    web_text_link("Manage Assets",
            DESCRIPTION,
            "Text=Manage Assets",
            "FrameName=main",
            ACTION,
            "UserAction=Click",
            LAST);
    web_text_link("Manage Assets_2",
            DESCRIPTION,
            "Text=Manage Assets",
            "Ordinal=2",
            "FrameName=main",
            ACTION,
            "UserAction=Click",
            LAST);

### Empty strings

There is a difference between not specifying an argument and specifying it as an empty string. When you do not specify an argument, VuGen uses the default value or ignores it. When you list an argument, but assign it an empty string as a value, VuGen attempts to find a match with an empty string or no string at all. For example, omitting the id argument instructs VuGen to ignore the id property of the HTML element. Specifying "ID=" searches for HTML elements with no id property or with an empty ID.

    web_text_link("Manage Assets_2",
            DESCRIPTION,
            "Text=Manage Assets",
            "Id=",
            "FrameName=main",
            ACTION,
            "UserAction=Click",
            LAST);

## General replay troubleshooting

### Run the same sequence of actions twice in the application

In some cases, you can only perform a certain process once, such as deleting a user from the database. Replay will fail after the first iteration, because the action is no longer valid. Verify that your business process can be repeated in the application more than once with the same data, without recording again.

### Image properties 'Id', 'Name' and 'Alt' are empty

In the Step Navigator, double click on the previous image step to open its properties. If the Id, Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.

Alternatively, you add an Ordinal argument to specify the occurrence number of the image on that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference.

### The step's description changes

Check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.

There are several solutions:

1. If the new value is stable, open the Script View and manually modify the value of the step's DESCRIPTION argument(s).

2. If the description changes from run to run, you can use a regular expression in the DESCRIPTION argument(s).

3. Alternatively, replace the problematic object description property, such as Name, with the Ordinal property.

For more information, see the Function Reference.

### Allow the page to load completely during recording

During recording, it is best to wait for the page to load completely before doing the next step. If you did not wait for all of the pages to load, record the script again.

### Replay failure

If the replay is failing at a particular step, check the step description. VuGen sometimes reads a single space as a double space. Make sure that there are no incorrect double spaces in the string.

### Replay snapshots

Replay snapshots may differ from the actual web page.

## Known issues

This section describes known issues for click & script protocols.

### WebUIPreloadScripts files are missing

The WebUIPreloadScripts files are no longer automatically included with OpenText Professional Performance Engineering. To run legacy scripts of click & script protocols, download the WebUIPreloadScripts files and copy them to %LG_PATH%\bin\WebUIPreloadScripts.

Download the files from this knowledge base article: WebUIPreloadScripts files

### Tulip toolkit is not installed

The Tulip toolkit is no longer automatically installed with OpenText Professional Performance Engineering. To run legacy scripts of click & script protocols, download the Tulip files and copy them to %LG_PATH%\bin\tulip.

Download the files from this knowledge base article: Tulip files

### Working with the Kerberos Protocol

If you are using the Kerberos Protocol for authentication, you must customize VuGen to properly convene authorization sessions. Advanced users can attempt to perform this customization themselves.

In order for the Kerberos Protocol to work properly, create a krb5.ini file and put it in an available folder. Save the full path name of krb5.ini into the KRB5_CONFIG environment variable.

The krb5.ini file should contain detailed information about each domain (KDS and AS addresses) and trust chains.

For more information, contact Software Support.

### Replay issue - GUI object not found

Does the error occur at the beginning of the second iteration?

If the error occurs at the beginning of the second iteration's Action section, it is probably the result of a starting page that was present for the first iteration, but missing for the second one. If the last page in an action does not contain the links and buttons that were available at the start of the iteration, then the next iteration will fail. For example, if the first page has a text link Book A Flight, make sure to navigate to the appropriate page, so that the same link is visible at the end of the business process.

Is it a text link containing non-ASCII characters?

If the problem occurs with non-ASCII characters, you should instruct VuGen to covert the data to a suitable character set.

To enable data conversion on Windows machines:

1. Select Replay > Runtime Settings and select the Internet Protocol > Preferences node.

2. Click Options to open the Advanced Options dialog box.

3. Locate Charset Conversions by HTTP in the Web (Click & Script) > General options, and set it to Yes.

To enable UTF-8 conversion for Linux Machines:

1. Select Replay > Runtime Settings and select the Internet Protocol > Preferences node.
2. Click Options to open the Advanced Options dialog box.
3. Locate Convert from/to UTF-8 in the General options and set it to Yes

Alternatively, view the list of alternatives that are displayed when a link is not found. Enter the displayed text as-is, such as hex escape sequences \xA0 or any other non-standard format.

### Out of memory error in JavaScript

To increase the JavaScript memory in the runtime settings:

1. Select Replay > Runtime Settings and select the Internet Protocol > Preferences node.
2. Click Options to open the Advanced Options dialog box.
3. Locate the Memory Management JavaScript Runtime Memory Size (Kb) and Memory Management JavaScript Stack Memory Size (Kb) options.
4. Increase the memory sizes to 512Kb or higher.

### VuGen displays JavaScript errors

If VuGen displays JavaScript errors in the Output pane, enable IE (Internet Explorer) script errors in order to verify that the Javascript itself does not contain errors.

To show script errors:

1. Open Internet Explorer.

2. Select Tools > Internet Options and click the Advanced tab.

3. Under Browsing, select the Display a notification about every script error check box.

4. Rerun the application in IE. If IE displays script errors, then there is a problem with the JavaScript application. If it is not possible to fix the application, you can safely ignore the corresponding replay errors.

## See also

- Function Reference

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: