Keyword Validation
A powerful feature of DéjàClick is Keyword Validation. Keywords are very useful for detecting if your page is not loading correctly, has changed significantly or has been hacked.
In DéjàClick, keywords can be:
- Auto-Suggested
- Entered Manually
- Taken from page source
AutoSuggest: The DéjàClick "AutoSuggest" keywording tool is where text suggestions are made by moving the mouse around the page and clicking to add the text string that is displayed as a suggestion. Keywords created using the AutoSuggest tool are also automatically associated to a specific target document/frame where the click occurred.
Manual Entry: You can also manually enter or edit keyword text strings. This is an option for special cases where non-standard behavior is needed or fine tuning is required. Keyword text strings are entered into (or edited) using the
Add/Edit Keyword dialog (illustrated below). Various other options are available, depending upon whether you're in
Basic or
Advanced display level.
Page Sourced: Keywords can also be added by selecting a small area of content on the page (
click-and-drag), then clicking on the highlighted content to bring up the keyword dialog. The associated source for the selected content is displayed in the dialog as the keyword text string, which may be further refined and edited as needed.
In all cases, keywords can use either plain text or regular expressions for performing more complex matches.
Details
AutoSuggested keywords work by inspecting the "inner text" of web page's HTML (structural) content for the page element the mouse is hovering over. DéjàClick suggests pre-sized text strings for the text appearing between a specific pair of HTML element tags. Take, for example, the following web page source:
<div>
<h4>this is one string of text</h4>
<br>
<p>this is a different string of text</p>
</div>
DéjàClick would offer two different text keyword suggestions when moving the mouse of each, respectively:
- "this is one string of text"
- "this is a different string of text"
The
AutoSuggest Keyword facility suggests only
visible text on the page that is "contiguous_ within the actual page source.
As another example, the Google home page display the three following links:
Advertising Programs -
Business Solutions -
About Google
However, only the text appearing for the
Business Solutions and
About Google links can be keyworded using AutoSuggest. This is because the
Advertising Programs HTML link in the source of the page is not contiguous. Rather, it's broken up by a special
"entity" character, as shown below:
<a href="/intl/en/ads/">Advertising Programs</a>
Manually Entered Keywords are useful when needed, but have their trade-offs. One disadvantage to creating keywords manually is that they are not "pre-validated" as they are when DéjàClick suggests keywords during mouse-overs. Since keyworded text may actually look different within the internal source of the page from the way it appears visually on the page (see Google example above), keyword validations may fail if their text spans across HTML element tags. Therefore, you always need to replay your transaction to find out if your manual keywords are working correctly, whereas AutoSuggested keywords are already checked at the moment they are created.
Another disadvantage to manually created keywords is that a specific document/frame is not automatically associated with the keyword (since there was no click event used to create them). Thus, all open documents will be searched by default. This can be adjusted by manually selecting a specific target document in the Add/Edit Keyword dialog if required (
Advanced display Level).
Page Sourced Keywords work by scanning the underlying page source for a matching block of source text, and can include the HTML tags and other structure content. This can be useful in special cases, but can be more "brittle" than standard AutoSuggested keywords because it relies on matching an exact portion of the underlying page structure (source code). If the source of a web page changes, AutoSuggested keywords may still work correctly, as long as the text is unchanged. But if you have keyworded
chunks of the page source, any future changes to that source code will cause a validation failure.
Below is an example of using AutoSuggest to add Keyword Validation.
Add Keyword to Script
During recording or replay (Action or Event), the Open Validation icon

on the DéjàClick toolbar will activate at the pause. Click the icon to display the Validation Bar above the main window:
With the cursor hovered over some text, in this example, “Advanced Search”, those keywords appear in the keyword selection box in the Validation Bar. Just click to select the keywords. The Add Keyword Validation dialog appears which allows you to modify some criteria related to the keywords. Here's the dialog when in
Basic display mode:
Here's the same Add Keyword Validation dialog in
Advanced display mode, which provides additional properties for fine-tuning validation:
Click OK to save the Keywords and close the dialog, then click the Close Validation icon

in the DéjàClick toolbar or click the 'X' in the upper right of the Validation Bar.
Keyword Error Detection
If the keyword or phrase is not found during replay, for example, if the site was hacked and the expected keyword no longer exists on the page, an error will be displayed and replay will stop:
Click the down arrow next to
Additional information to display more information, including the actual keyword in error:
You can modify this on the fly through the Keyword Validation property panel in the
Properties Sidebar. Click on the
Properties tab in the DéjàClick sidebar, then click
Keyword Validation to open the panel:
Click on the erroneous keyword to highlight it. This activates the
Edit button. Click the Edit button to display the
Edit Keyword Validation dialog:
Enter a new keyword or phrase, then click
Apply. Keep in mind that
keywords are case- and space-sensitive. In this example, we have an easy choice to change to:
The Keyword Validation property panel will display the new keyword:
Click the Replay button to make sure the keyword works correctly.
Another method for changing the keyword is to delete the keyword (highlight it and click the
Remove button), set the Replay selection to
Replay next event, and step through the replay until you get to the page you want to keyword. Click the Open Validation panel icon and follow the steps described above.
Back to Top