Forum Discussion
AlexanderM
15 years agoStaff
Hi Peter,
Your routine should not work properly - the code line is incorrect. I recommend that you see the "WaitChild Method" and "SwingObject Method" help topics - they explain how to use this methods in the correct way.
To accomplish your task, I suggest that you try using the modified routine:
function WaitForDesigner()
{
Sys["Process"]("java")["WaitChild"]("*EditModalDialog*", 30000);
}
Passing "EditModalDialog" as the first parameter to the WaitChild method in your routine should not be sufficient for obtaining the object you expect. You need to pass the value of the needed object's Name property that can be found out from the [url= http://www.automatedqa.com/support/viewarticle/?aid=2541]Object Browser[/url]. Since I do not know the exact value of this property, I used the "*" wildcards - the WaitChild method will return the object containing "EditModalDialog" in the value of its Name property.
BTW, I recommend that you use JScript instead of C#Script unless you are going to create C# Connected or Self-Testing applications. The JScript syntax is more intuitive, and the functionality of the two languages is equal. Also, note that C#Script scripts can be launched in JScript projects and vice versa. The same applies to C++Script. Please see the "[url= http://www.automatedqa.com/support/viewarticle/?aid=8241]Selecting the Scripting Language[/url]" help topic for more information.
Related Content
- 12 months ago
- 4 years ago
Recent Discussions
- 12 hours ago
- 13 hours ago