Journey Scripting > Actions > Assert

Assert

This action allows you to check that something exists on a page using CSS and Javascript selectors.

Before writing Javascript selectors, please read this note!

Parameters

Name Required Description Example
Type Yes The action type Assert
Comment Yes The action comment Ensure the title contains 'pricing'
Selector Yes The CSS selector h3.title:contains(pricing)

Example

Here we are checking that the selector h3.title contains the word 'pricing'.

An error will be created and the journey will fail if this action does.

{
    "Type":"Assert",
    "Comment":"Ensure the title contains 'pricing'",
    "Selector":"h3.title:contains(pricing)"
}