Cookie assertions

What are cookies?

Cookies are a type of message given to a web browser by a web server. They aim to identify users and potentially prepare customized web pages to prevent the user from having to re-enter information.

Why are they useful?

Cookies essentially customize your web experience! For example, if you visit an online shop for the first time, the site's server sends a file to your computer and automatically installs this file on your disk. As a result, you'll be recognized the next time you visit this website, and you won't have to re-enter your information.

How many kinds of cookies are there?

There are three main types of cookies: session, permanent, and third-party cookies. Session cookies are primarily used by online shops, and expire when the browser is closed. Permanent cookies are the kind that remain in operation even after closing the browser. They remember your login credentials so you don't need to re-enter them evefry time you visit a site. There are also third-party cookies, which are installed by external parties that collect certain user information on demographics and behavior.

You can now use the trainer to set cookies and then create assertions against cookie attributes. Please use the following steps as a guide to doing so.

How to set a cookie

  1. Click on the "More Actions" icon in the bottom toolbar.
  1. Click on the option to 'Manage Cookies'.

You'll see this popup.

Options - managing cookies

Options - managing cookies

  1. Click on the option to Set Cookie, and fill out the name and value. Click "Save".

How to train a journey with Cookie Assertions

  1. Create a new assertion from the assertions menu.
Adding assertions

Adding assertions

  1. Choose the option to assert against a Cookie.
  2. Select a cookie from the drop-down menu to view its attributes. The trainer will automatically populate this drop-down with a list of all cookies that are associated with the current page.
Choose to assert against "Cookie"

Choose to assert against "Cookie"

Selecting a cookie

Selecting a cookie

  1. Review the assertion properties, and modify if needed. Click "Save".
  1. You'll now see a step in your journey containing the cookie assertion.

Important information about creating an assertion

Assertions can only be added when creating a Journey, see Defining a journey with the mabl trainer and Including assertions in your journey for more information.

Cookie assertions


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.