Forum Discussion
- YMinaevStaffHi,
To wait for a process, you need to use the Sys.WaitProcess method. You need to specify a timeout in it, but it will return as soon as the target process loads, so, it is OK to use a large timeout, and this won't create a greater delay. - kmOccasional ContributorUnfortunately, Sys.WaitProcess doesn't return as soon as the target process loads when the timeout is set up.
Thanks! - YMinaevStaffHi,
How do you call WaitProcess? Also, how long does it take your process to load and how long does WaitProcess actually wait? Does it return a valid reference (Exists equals true) to your process? - kmOccasional ContributorI called like:
Sys.WaitProcess("...application name");
Usually, it comes back before the process loads. - kmOccasional ContributorWhen I called with the timeout which should be more than the loading time, it waits exactly for the timeout.
- YMinaevStaffHi,
So, does it actually return a valid reference? - kmOccasional ContributorWhen I tried on the return value with Validate(object), the return value doesn't validate.
- YMinaevStaffHi,
You should check the returned object's Exists property. If it equals false, make sure that you address the correct process (check the name you pass to WaitProcess). - kmOccasional ContributorExists retruns true, but it doesn't wait the process.
- YMinaevStaffHi,
OK, we still need to have a detailed description of the behavior you observe.
1. What is the exact code for the WaitProcess call.
2. Exactly, how long (in milliseconds) does it take your application to load.
3. Exactly, how long (in milliseconds) does it take WaitProcess to return.
4. What is its result?
5. Is the result correct (corresponds to the appropriate process)?
6. What is the exact process name as displayed in the Object Browser?
Related Content
- 11 months ago
- 5 years ago
Recent Discussions
- 3 hours ago
- 10 hours ago
Working with Visual Test
Solved2 days ago