Keyword Validation

Last modified on March 27, 2024

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 panel during the recording, do the following:

DéjàClick 2.0

  1. While staying on the page that is being recorded, click Add Validation.

  2. In the drop-down menu, select Keyword Validation.

After that, the Add keyword validation panel appears. You can use it to configure your validation and specify its parameters.

DéjàClick 1.x

  1. While staying on the page that is being recorded, click on the DéjàClick toolbar.

  2. Select Add keyword validations from the drop-down menu.

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 panel – Basic and Advanced. To switch between them, use the Display Level drop-down list.

DéjàClick 2.0

Basic View Advanced View
Keyword validation: Basic view
Keyword validation: Advanced view

Click the image to enlarge it.

DéjàClick 1.x

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 panel, or adjust your script after recording and saving it.

Add keyword validation has the following options:

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

  • 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 consider 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.

DéjàClick 2.0

  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 Validations > Keyword Validation on the DéjàClick toolbar.

  5. Click the following text: 10 Facts that You Don't Know About "Starry Night". The keyword validation automatically copies your selection into the validation dialog.

    The Add Keyword Validation dialog

    Click the image to enlarge it.

  6. Click Save.

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

DéjàClick 1.x

  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 keyword validations.

  5. Click the following text: 10 Facts that You Don't Know About "Starry Night". 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 in your script.

Replay your keyword script

DéjàClick 2.0

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 on the DéjàClick toolbar.

DéjàClick 1.x

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 on the DéjàClick toolbar.

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.

DéjàClick 2.0

Keyword missing

DéjàClick 1.x

Keyword missing

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

DéjàClick 2.0

Replay results

Click the image to enlarge it.

DéjàClick 1.x

Replay results

Click the image to enlarge it.

See Also

Script Variables
JavaScript Validation
Configuring Scripts

Highlight search results