Ask a Question

Property Checkpoint posting a warning

SOLVED
MW_Didata
Frequent Contributor

Property Checkpoint posting a warning

Hi I would like a property checkpoint to post a warning not an error, i just want to know if this is possible or if it is locked as an error?

As seen in attached image, those errors fail the test, however if the first one fails i want it to be a warning, the second error is fine.

MW_Didata_0-1664279155430.png

 

4 REPLIES 4
rraghvani
Trusted Contributor

See About Property Checkpoints, section Property Checkpoint Alternatives.

MW_Didata
Frequent Contributor

When reading this page all I'm getting is that it is not possible to post a warning?

If so then is there another check i can use that can read an onscreen property and when incorrect post a warning?

 

Thanks for the help!

rraghvani
Trusted Contributor

The Property Checkpoint Alternatives for example is,

 

 

function test1()
{
    x = 1
    y = 2
    
    // Implement custom verification logic and post custom success and failure messages to the test log
    if (x == y) {
        Log.Message("X equals to Y");
    } else {
        Log.Warning("X not equal to Y");
    }
    
    // Or use property checkpoint to verify object’s property value according to a certain condition
    aqObject.CompareProperty(x, cmpEqual, y, false, lmWarning);
}

 

 

 

MW_Didata
Frequent Contributor

Okay so About Property Checkpoints, was actually the right call.

  • To compare the actual and expected property values, use the if … then … else statement and comparison operators such as =, >, >=, <, <= and so on. This way, you can implement custom verification logic and post custom success and failure messages to the test log.

So i used the Compare property instead and that has fixed my problem. thanks for your help

cancel
Showing results for 
Search instead for 
Did you mean: