Error: “Object doesn’t support property or method ‘indexOf'” when saving the “Speed simulation” run-time settings of a TruClient script

An error is received when trying to save the “Speed simulation” Run-time settings of a TruClient script:

“Script Error: An error has occurred in the script on this page.

Error: Object doesn’t support property or method ‘indexOf'”

As a result the settings are not saved and the “Save” button becomes disabled.

The issues is caused by missing default values for the speed simulation settings.

To fix the issue for the current script:

1.Open the default.cfg file in the script folder.

2. Go to the [ModemSpeed] section

3. Add values for the ModemSpeedUpload, ModemSpeedDownload and ModemSpeedDownloadAndUpload settings.

For instance:

[ModemSpeed]

ModemSpeedMode=1

ModemSpeedUpload=0

ModemSpeedDownload=0

ModemSpeedDownloadAndUpload=0

4. Save the file and reopen the script in TruClient

5. Go to the Run-time settings > Network > Speed simulation. Changing and saving the values should work now.

To fix the issue for any new scripts, modify the run-time settings templates for TruClient IE and Firefox:

Apply the above changes to the following default.cfg file:

<LoadRunner installation>\template\WebIE\default.cfg

<LoadRunner installation>\template\Web2UI\default.cfg

After saving the changes, any new TruClient script will have the default runtime settings for “Speed simulation”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s