Is there a way to use if..else.. in botium scripts


I have a case where I wanted to validate a bot response based on a parameter passed.
eg. I have a parameter called config. If config is “x” then bot will respond “abc” if config is “y” bot will respond “abc + xyz”.

I want to make my script dynamic to consume this config and check the response based on a if…else… condition.

Is it possible in botium?


Conditional testing leads to flaky tests and makes it hard to track down failures. That’s why Botium doesnt support it. If you want to read more about why to avoid conditional tests, there is an excellent article in the Cypress docs: Conditional Testing | Cypress Documentation

Ohk got it @Florian. Thanks for this article, it is indeed helpful

1 Like