Top Rounds
| We are Hiring! |

_assertNull ·

This is a Browser Action API.

_assertNull will do nothing if the object passed to it is null. (Object does not exist)
_assertNull will log failures to the playback logs if the object is not null. (Object exists)
DO NOT USE THIS IN AN IF CONDITION as it does not return any value, and throws an exception if the object is not null.

Syntax:

_assertNull(object, message)
The parameters are:

  • object: Any object
  • message: Message to be written to logs if condition was true

Example:

_assertNull(null); // does nothing
_assertNull(“abc”, “Some Log Message”); // throws exception // and writes “Some Log Message” to logs.




---


Top Rounds