Contributions
Re: Waiting for WPF Objects without WaitWPFObject
Hi Alexi, If I run the following code and it times out, it writes object not found errors to the logs. The screen that I'm waiting for takes avariable amount of time to pop up, depending on the system, so it's something that I need to loop a wait object for. i = 0 Do Set w = setup.WPFObject("HwndSource: win_SubscriptionInfo", "Setup").WPFObject("win_SubscriptionInfo", "Setup", 1).WaitWPFObject("DocumentRoot", 45000) i = i + 1 Loop Until (w.Exists And w.VisibleOnScreen) Or (i > 10) Set grid = setup.WPFObject("HwndSource: win_SubscriptionInfo", "Setup").WPFObject("win_SubscriptionInfo", "Setup", 1).WPFObject("DocumentRoot")1.6KViews0likes0CommentsWaiting for WPF Objects without WaitWPFObject
In the project that I'm testing, I need to wait for a WPF object that may not be available for several minutes as the system does its processing. If I use WaitWPFObject and set the timeout to more than about 30000 milliseconds,it will not wait the whole time. The semi-solution thatI have come accross is to put the WaitWPFObject call in aDO loop and check for it to exist and be visible on screen. The only problem with this is that if the WPF object doesn't exist, it will write an error to the log, which I don't want. Is there any way to reference a WPF Object fromWaitChild or Wait Window, or cause WaitWPFObject not to write an error to the log?14KViews0likes6Comments