Skip to main content

Card Asserters

Some Chatbots are responding not only with text, but with grouped UI elements. If the grouping is not just visual, but has some extra function like paging, or hiding, then it is called a Card. Botium can assert the existence of such Cards in the chatbot response.

Cards/Carousel

Imagine a chatbot that takes food orders. In the response, there are cards for paging with titles Soup, Pizza, and Dessert. You can assert them:

User: What can I order please?

Bot: Please choose something from our Menu Card!

  • Soup
  • Pizza
  • Dessert

The CARDS asserter (arguments: card titles to look out for), used in the bot response, will assert that these cards are attached in the response.

Cards/Carousel Count

This asserter will validate the number of card elements.

You can use number comparisons or a specific number for equality:

  • CARDS_COUNT 2
  • CARDS_COUNT =2
  • CARDS_COUNT >2
  • CARDS_COUNT <=3


Cards/Carousel Nested Count

This asserter will validate the total number of card elements, including those nested within other content.

You can use number comparisons or a specific number for equality:

  • CARDS_COUNT 2
  • CARDS_COUNT =2
  • CARDS_COUNT >2
  • CARDS_COUNT <=3


Was this article helpful?

0 out of 0 found this helpful