Types of Assertions


Use case

  • The most important steps we need in our tests are the validations/assertions. We'll need assertion to see if the app shows what we expected from it.

CloudQA has a wide range of assertion options, so you can choose the ones that suit best for your needs

During recording, the default assertion type is Check which can be changed based on requirement in edit steps

How to add an Assertion in Edit Steps

1. Go to Edit steps of a test case and Add a step, select step name as Assert

2. Add the CSS of asserted element(using pick CSS in the extension), give the text/values, name the step and select the assertion type

Local Image

Following are the Assertion types and its usage

  • Check (default): validates the value/text asserted is equal to value/text is present during execution of the test case

  • Check not: validates the asserted text/value is not equal to value/text is present in test case execution

  • Contains: validates whether asserted text is contained in the element

  • Less than: validates the value asserted is less or equal to the value during execution

  • Greater than: validates the value asserted is greater or equal to the value during execution

  • Exists: validates if element exists in the page or not

  • Script: validates if script returned value is true or not

results matching ""

    No results matching ""