When implemented, CX UI Capture for AJAX enables the capture of user interface events that do not issue requests to the server. For example, AJAX-based interfaces can change the page displayed to the user based upon JavaScript™ routines that are embedded in the page. If the JavaScript does not make a request to the web server, Tealeaf does not capture the event by default.
You can configure RTV to enable some of the UI Capture functionality.
HighlightOnlyURL profile rules
Without UI Event capture, replay of pages that uses Ajax is generally not possible. If the Ajax requests happen to post form field information that corresponds to named elements on the page, it sometimes possible to 'simulate' UI events, and to display some page updates that happen during the session.
To determine whether a page is a candidate, examine it for the following characteristics:
- Is it an Ajax page? Ajax pages can be of type text/plain, text/xml, text/json, or others. An Ajax page can also be text/html, but the response data may not look like a complete html page. It might contain
<div>
and other element tags yet no main<html>
tag. - Examine the data in the
[urlfields]
section of the request. Do these entries correspond to HTML page elements on a previous page? - Are there Ajax calls for all or nearly all UI actions on the page?
If all of these conditions are met, you can create a rule to tell RTV to treat the page as a Highlight Only
page. The response data in Highlight Only
pages is not used as a displayable HTML page. Instead, RTV leaves the previous page that is displayed, and the form fields from the Highlight Only
page are used to populate fields with data.
Under optimal conditions, the act of populating the field values causes OnClick or OnChange events to fire, which causes JavaScript in the application to run. This JavaScript generates an Ajax request for a page that is marked as highlight only. The application itself then uses the data that is returned from the captured page itself to update the displayed page.
Creating through RTV
There are multiple ways to create or edit HighlightOnlyURL rules.
From Replay view
In Replay view, right-click the page, and select Replay Rules > Treat this page as Highlight Only. You can optionally edit the URL pattern in the resulting dialog to add wildcard characters in place of sections of the string that might differ from session to session. If the URL contains a query string, you might replace everything after the ?
with a *
.
From Request view
If the URL itself is not unique enough to distinguish the prospective HighlightOnly page from a standard page, you can use values in the Request view to further qualify the rule.
- In Request view, locate an entry that distinguishes this page from standard pages. Common examples are ResponseType and REQUEST_METHOD.
- Right-click the located entry, and select Treat page with this request value as Highlight Only.
- Edit the URL pattern as needed.
Editing HIghlightOnly rules
Like all other profile rules, the HighlightOnlyURL rules can be edited in the profile in the Options dialog.