Top Rounds
| We are Hiring! |

_assertNotNull ·

This is a Browser Action API.

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

Syntax:

_assertNotNull(object, message)
The parameters are:

  • object: Any object
  • message: Message to be written to logs if object is null

Example:

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




---


Top Rounds