Forum Discussion

sandeep7972's avatar
sandeep7972
Occasional Contributor
4 years ago
Solved

CheckProperty

Hi 

Im creating a script in JavaScript to verify the details of a page in a Desktop application.

I would like to know how to check that the caption of an object is one of the value we have.

For example, in a 'status' field, we know that there should be one of the following values. New, Completed, In progress, closed. 

So what i tried is the following script

aqObject.CheckProperty(Object, "Caption", cmpEqual, " New"||"Completed"||" In progress"||" closed");

 

This script passes if the status value in the page is 'New'. If its anything else it fails. Please advise me on any possible methods to tackle this.

Thanks

5 Replies