If the main page loaded into RTV references a separate file that is not part of the session, the file can require modification before it is loaded into RTV. For example, if a Javascript file referenced by a page in a session contains a domain reference, that reference can result in a JavaScript™ error during replay.
You can design one or more external file modification rules to apply to the referenced JavaScript file that modify the file before it is loaded into RTV.
External file modification rules use the same user interface as response modification rules. However, external file modification rules cannot be applied to all files in the domain.
- In RTV, select Tools > Get
Images.
This loads external content into RTV so that the file can be used to create the rule.
- In RTV, select View > Show Images.
- In the Image List dialog, locate the file to modify.
- To locate the text to be modified, select View in Notepad to display and search for the text in Notepad.
- Click Add Modify Rule, and enter a regular expression in the Pattern field, and enter an appropriate Replacement string.
- Click Test to make sure that the pattern is found. Click Diff to verify that the replacement is the wanted string.
- To create and apply the rule, click OK.