Forum Discussion
Thank you Robert for your reply.
When I used the following code, I get an error : "JScript runtime error..the aliases object does not have a child with the name 'update_complete_window_object_name' ".
var dlg = Aliases.WaitAliasChild('update_complete_window_object_name', 120000);
if (!dlg.Exists){
Log.Error('The upload window did not appear within 2 minutes');
}About this, using this I can apply WaitWindow but I still run into the same problem i.e. it's trying to assign to variable dlg, the window which does not exist. But I suppose that is expected behavior.
var dlg = Sys.Process('MyApp').WaitWindow('abc','Update Complete', -1, -1)
Thanks,
Sameer
Not necessasrily. WaitWindow, when it returns, will return either the object being waited for or an empty "stub" object with the Exists property = false. so... something else is going on. The key is in utilizing the proper wait method.
You have this in your original post:
var dlg = Aliases.update_complete_window_object_name;
I assume that meant that the Aliases object did have an Alias by the indicated name (update_complete_window_object_name).
I think what we need to proceed is two things:
1) a screenshot showing your Aliases object and the mapped object that corresponds to the window you are looking for
2) a screenshot of the object browser showing your application and the dialog window you're looking for.
Those two things will help us figure out the best way to get you what you need.
- sameerjade9 years agoFrequent Contributor
I am now able to get this to work. I was previously setting 'MyApp' as the object that I was waiting for rather than its parent object. Like you mentioned in your previous comment, wait window works for the parent object. I made the correct and now it works when I use wait window with the parent object. Thanks!
var dlg = Sys.Process('MyApp').WaitWindow('abc','Update Complete', -1, -1)