assertTrue

Asserts whether given value is either true, non-empty, or truthy (in JavaScript terms):

- assertTrue: ${value}

This command is primarily designed to be used in combination with JavaScript values. For example, you can assert that two views have the same text:

- copyTextFrom: View A
- evalScript: ${output.viewA = maestro.copiedText}
- copyTextFrom: View B
- assertTrue: ${output.viewA == maestro.copiedText}

You can also use it to immediately fail the test:

- assertTrue:
    condition: ${false}
    label: This will always fail
assertVisibleassertNotVisible

Last updated