Forum Discussion
sbkeenan
14 years agoFrequent Contributor
Hi Ofer
I'm not too sure about the syntax of your chosen script language, but the problem you are experiencing is most likely due to the way in which you have used the WaitAliasChild method. As far as I know, it accepts two parameters, the child name and the wait time, but your statement looks like it is supplying the method with three parameters. The method should read along the lines of:
....WaitAliasChild("<child name>", <wait time>)...
You should also check to ensure that all the previously listed objects in the statement have been correctly mapped and are available to TestComplete before it executes the WaitAliasChild part, for example, if the ["WPFObject"] isn't available, then nothing after that will be available. So, it may be that you need to introduce the WaitAliasChild method sooner in order that TestComplete waits until a previous object becomes 'visible'
Hope this helps.
Regards
Stephen.
Posts 162
Hi,
i'm using WaitAliasesChild in order to find a child object that has just been added to the application and TC is unable to find it.the name of the new object as display in the object spy is as follows ("TextBlock", AddedDocumnt, 1). so my WaitAliasesChild looks like this
Aliases["DesktopMainWindow"]["NavigationalPaneTOCTree"]["WPFObject"]("TreeViewItem", "", UpdatedTab)["WaitAliasChild"](("TextBlock", AddedDocumnt, 1), 10000)["Exists"]
UpdatedTab - is the tab where the new document was updated which it's randomal
AddedDocumnt - is the document name that was updated
is there a problem with that or should it work according to what i wrote?
Thanks
I'm not too sure about the syntax of your chosen script language, but the problem you are experiencing is most likely due to the way in which you have used the WaitAliasChild method. As far as I know, it accepts two parameters, the child name and the wait time, but your statement looks like it is supplying the method with three parameters. The method should read along the lines of:
....WaitAliasChild("<child name>", <wait time>)...
You should also check to ensure that all the previously listed objects in the statement have been correctly mapped and are available to TestComplete before it executes the WaitAliasChild part, for example, if the ["WPFObject"] isn't available, then nothing after that will be available. So, it may be that you need to introduce the WaitAliasChild method sooner in order that TestComplete waits until a previous object becomes 'visible'
Hope this helps.
Regards
Stephen.
Posts 162
Hi,
i'm using WaitAliasesChild in order to find a child object that has just been added to the application and TC is unable to find it.the name of the new object as display in the object spy is as follows ("TextBlock", AddedDocumnt, 1). so my WaitAliasesChild looks like this
Aliases["DesktopMainWindow"]["NavigationalPaneTOCTree"]["WPFObject"]("TreeViewItem", "", UpdatedTab)["WaitAliasChild"](("TextBlock", AddedDocumnt, 1), 10000)["Exists"]
UpdatedTab - is the tab where the new document was updated which it's randomal
AddedDocumnt - is the document name that was updated
is there a problem with that or should it work according to what i wrote?
Thanks
Related Content
- 2 years ago
- 6 months ago
- 13 years ago
- 2 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 7 days ago