An assert statement is a special Boolean condition that represents an assumption about program state at a particular point in test execution. When an assert is encountered, the condition is evaluated. A value of False indicates a program error. In some languages, execution will halt if an assertion evaluates to False. In Rapise, the result is logged to the report with failedstatus, and execution continues.
Select a location in your script and a subset of application state to check.
Query for the application state. For images, use the ImageWrapper class provided with Rapise. For object properties, Get<..> methods. For example:
var xx = SeS(?OkButton?).GetX(); // X position of the object
Save the state. If you are creating an image checkpoint, you will want to save the image to a file. If you are looking at text data, you could use a database, spreadsheet or text file. The SeSSpreadSheet class gives you access to excel spreadsheets.
Compare. Use the ImageWrapper class to compare images; use Spreadsheet to read and compare spreadsheet data.
Write an Assert Statement. Make an appropriate call to Tester.Assert method. Besides a Boolean condition, pass additional data to be placed in the Report.