Hi,
I want to know how can identified that a form has been loaded completely or it is still loading state?
For example, if we launch MS Outlook it took sometimes to load form. How can we know that form has loaded or not?
Thanks,
Sachin
How to know when a window is completely loaded?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to know when a window is completely loaded?
Hi cancerion,
try to access the form element. If the form window isn`t loaded you get an ElementNotFound exception.
You can run the check in a loop and wait an amount of time until the next recheck.
e.g.
sample code
Web Documents:
In web documents you have the ability to check the State property.
The different states are: (invalid, loading, loaded, interactive, complete)
Best regards,
Christian
Ranorex Support Team
try to access the form element. If the form window isn`t loaded you get an ElementNotFound exception.
You can run the check in a loop and wait an amount of time until the next recheck.
e.g.
sample code
Ranorex.Form form = null; while(true) { try { form = repo.FormAdobe_Reader.FormAdobe_Reader; break; } catch { System.Threading.Thread.Sleep(4000); continue; } }An other way to wait for the application to start is to set the element Search Timeout of your first element you want to access.
Web Documents:
In web documents you have the ability to check the State property.
The different states are: (invalid, loading, loaded, interactive, complete)
Best regards,
Christian
Ranorex Support Team