Tuto WINDEV 25
Part 4: Full application with data 283 9. The test appears again in the test editor. The "Compilation errors" tab pane reports several test errors. 10. Redisplay the "WIN_Menu" window in the editor. 11. Display the description of the "Find" Button control ("Description" from the popup menu). 12. In the "UI" tab, select "Enabled". 13. Validate the control description window. 14. Go back to the test editor (click the corresponding button in the open documents bar). 15. Run the test again. The test is now successfully run. ▶ Another feature of the test editor is the ability to modify or add WLanguage code in the test scenarios. We are going to add code lines to check whether the Table control contains at least one record. 1. Display the test editor if necessary (for example, double-click "TEST_Menu" in the "Tests" folder of the "Project explorer" pane). 2. Add the following code before the line "EmulateMenu("_Menu","OPT_Exit")": // If the Table control contains no record IF WIN_Menu.TABLE_QRY_FindOrders..Count = 0 THEN // An error must be signaled TestWriteResult(twrError, ... "The Table control is empty after search") END 3. Save the test. 4. Click the icon. The test is successfully run. Indeed, the Table control contains at least one record.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==