Last modified on November 22, 2017

With keyword validations, your script can verify that the page is loading correctly or if it has changed, intentionally or unintentionally. DéjàClick will automatically detect keywords for you with the Add Keyword Validation feature.

To open the Add Keyword Validation dialog during the recording, do the following:

  1. While staying on the recorded page, click Add validationsAdd Validations.

  2. In the drop-down menu, select Add keyword validation.

After that, the Add Keyword Validation dialog appears. You can use it to configure your validation and specify its parameters.

Keyword Validation Views

There are two available views for the Add Keyword Validation dialog – Basic and Advanced. To switch between them, use the Display level drop-down list.

Basic View Advanced View
Keyword validation: Basic view

Click the image to enlarge it.

Keyword validation: Advanced view

Click the image to enlarge it.

Keyword Validation Options

When you use keyword validations during your script, the validation will use default properties from configuration. You can change these while creating the validation in the Add Keyword Validation dialog, or adjust your script after recording it and saving it.

In the Add Keyword Dialog, you have the following options:

  • Keyword edit box: Specify the value to look for here.

  • Use script variable – Select to define a keyword as an existing or new script variable.

  • Match options allow you to define what exactly DéjàClick should look for while performing the replay.

    • Keyword Match Type – Select if the value specified in the Keyword edit box is plain text or regular expression
    • Match Case – Select to command DéjàClick to сonsider the characters case during the validation
    • Allow line wrap – Select to command DéjàClick to match even the values with line breaks
    • Match whole word/phrase – Select to command DéjàClick to match the whole word or phrase only
    • Normalize blank spaces – Select to normalize blank spaces during the validation
  • Action options allow you to specify an action to perform when the keyword match is found or not.

    • Perform this action – Select an action to perform in the drop-down list
    • When a keyword Match is – Select whether the action should be performed when the match is found, or when it is not found
  • Search options allow you to specify documents which DéjàClick can use for validation.

    • Search for Keyword in – Specify whether DéjàClick should look for matches only in the selected document, or in all documents
    • Select Document – Click to specify a document for validation

Keyword Validation Tutorial

For example, you visit Google to search for Van Gogh’s Starry Night, while want to make sure you see the following text: Starry Night by Vincent van Gogh - Van Gogh Gallery.

  1. Start Chrome and DéjàClick.

  2. Click RecordRecord.

  3. Navigate to https://google.com and type Starry Night in the search field.

    Starry Night search results in Google

    Click the image to enlarge it.

  4. Click Add validationsAdd Validations > Add Keyword Validation

  5. Click the following text: Starry Night by Vincent van Gogh - Van Gogh Gallery. The keyword validation automatically copies your selection into the validation dialog.

    The Add Keyword Validation dialog

    Click the image to enlarge it.

  6. Click OK.

  7. Click Stop Record/Playblack. DéjàClick completes your recording. Your keyword validation will appear attached to the step to the step in your script.

Replay your Keyword Script

After completing your script, you can replay it to make sure you have the results you want. Click ReplayBegin Replay icon and watch the replay of your script. To save your script to your desktop, click Save recordingSave.

DéjàClick Alert

If a keyword is not found when replaying the script, DéjàClick will display an alert. Open the Additional Information drop-down panel to see the details.

Keyword missing

The results for the script will record the details, so you know exactly what occurred:

Replay results

See Also

Script Variables
JavaScript Validation
Configuring Scripts