Assert and IF statement

Nevermind I thought I figured out a solution, but its not working right

Hi Reece

The assert statement is not a boolean expression (it takes boolean but doesn’t return one). So I don’t think you can wrap it in IF logic.

Caveat: I never use asserts so I could be wrong.

Hope that helps move you forward.


Just to update this thread for anyone in the future. I found a solution. Just remove the assert and failurehanding

if(!(WebUI.verifyTextPresent(today, false) || WebUI.verifyTextPresent(yesterday, false))){
log.logInfo("T3NWPRSD did not run Today or Yesterday")