![]() ![]() If(Global.DoWaitForProperty('LoadingForm', 'GetWindowText', 'Ready', 15000)) * Phase 2: Launch the same app, and wait using 'DoWaitForProperty' So we wait for a specific value of the title, exactly what we do via Global.DoWaitForProperty: RVL In the considered application we have a Title (WindowText) that is visible all the time and finally it says Ready when the application is loaded: It may be progress bar or status message. Global.DoWaitForProperty is used when there is an object that changes its state during the process and we need to wait for it to reach specific state. If object is not found then DoWaitFor just returns false without writing anything to the report. The second parameter is a timeout to wait for. Please, note that the first parameter in Global.DoWaitFor represents an object by its Object Id. Tester.Assert("DoWaitFor worked", false) we need to report a failure explictly. does not affect execution report, so in our case We are here because DoWaitFor succeeded! Global.DoLaunch("App\\LongLoadingApp.exe") * Phase 1: Launch app, and wait using 'DoWaitFor' So here is how we can wait for the object: RVL In the AUT (application under test) we have a button Proceed> that is not available until the app finishes loading. Global.DoWaitFor is used when there is an object that may not exist on the screen before some point of time. The sample test and application are available on GitHub. We have an application that is doing some initialization during load:įinally, when initialization is done, the Proceed> button appears on the screen: In this article we show the difference between the Global.DoWaitFor and Global.DoWaitForProperty synchronization functions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |