Forum Discussion
object may be of any type , combox, button, window etc
var OpenDefaultBox= vizbybis.mainview.exploresearch.containingbox.opendefaultcombobox
sync(OpenDefaultBox);
OpenDefaultBox.Click();
As I said, if the object above is not presented in the system at the moment, when OpenDefaultBox variable was assigned, your function will not work.
Please read the topics about common tasks in object searching and waiting: https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html
Probably you can use WaitAliasChild() method in your case.
- meenakshiyadav16 years agoContributor
WaitAliasChild is also not working .
JScript runtime error. Object doesn't support this property or method
JScript runtime error.This is how I am using it:var OpenDefaultBox= vizbybis.mainview.exploresearch.containingbox.opendefaultcombobox
if(vizbybis.WaitAliasChild(OpenDefaultBox, 10000).Exists)
{
OpenDefaultBox.Click();
}
else
Log.Message(OpenDefaultBox+" object not found")- baxatob6 years agoCommunity Hero
No, you are using wrong objects.
Your target object is vizbybis.mainview.exploresearch.containingbox.opendefaultcombobox
So you should code it like:
parent_object = vizbybis.mainview.exploresearch.containingbox child_object = parent_object.WaitAliasChild("opendefaultcombobox", 10000)
- meenakshiyadav16 years agoContributor
Still not working.
var Parentobj= vizbybis.mainview.exploresearch.containingbox
if(Parentobj.WaitAliasChild("OpenDefaultBox", 10000).Exists)
{
OpenDefaultBox.Click();
}
else
Log.Message(OpenDefaultBox+" object not found")getting below error:
JScript runtime error. The Aliases.browser.page.objvizexplorer.vizexplorer.mainview.exploresearch.containingbox object does not have a child with the name "OpenDefaultBox".
Even though the object is mapped in name mapping.attaching the screenshot