As of Desktop App v1.29.0, we have introduced the ability to create assertions against CSS properties! You can now natively create a low-code assertion against the rendered CSS values of elements on your webpage. 🎉
With CSS assertions, you can validate that your page is rendering the proper fonts, colors, and other styles!
Try it out
To see CSS assertions in action, head to the mabl Trainer and create an assertion:
- Click on the check mark icon at the bottom of the Trainer window. A prompt to "Click on an element" will appear in the browser window.
- Click on the page element that you want to assert against.
- In the Trainer window, click on the “CSS” tab to define your CSS assertion.
If you used a JavaScript snippet as a workaround to assert on CSS properties, we recommend migrating those JavaScript steps to use the new CSS assertion.
Limitation
CSS assertions against images are not supported.
For more information on asserting against page elements, check out our docs.