Top Rounds
| We are Hiring! |

_assertTrue ·

This is a Browser Action API.

_assertTrue will do nothing if the condition passed to it is true
_assertTrue will log failures to the playback logs if the condition evaluates to false.
DO NOT USE THIS IN AN IF CONDITION as it does not return any value, and throws an exception if the condition is false

Syntax:

_assertTrue(condition, message)
The parameters are:

  • condition: boolean expression
  • message: Message to be written to logs if condition was true

Example:

_assertTrue(1==1); // does nothing
_assertTrue(1==2, “Some Log Message”); // throws exception // and writes “Some Log Message” to logs.




---


Top Rounds