Forum Discussion
jmcwhinney
12 years agoContributor
Hi Tanya,
The .DblClick() command effectively did nothing.
I think the issue is that when TestComplete gives me a reference to an object (in this case my tree), then I can use the .Click() and .DblClick() functions.
However, if I want to click on a specific child/leaf node in the tree, and I use my tree reference to manually get other object references beneath it (the nodes within the tree), I cannot use the .Click() and .DblClick() functions on those child objects.
At that point, I can only use the child objects own methods.
It seems I would have to instead call the tree's event handler at that point, which requires using additional classes and I haven't figured out how to do that in test complete yet.
For example, when I record my actions into a script, it appears as:
The .DblClick() command effectively did nothing.
I think the issue is that when TestComplete gives me a reference to an object (in this case my tree), then I can use the .Click() and .DblClick() functions.
However, if I want to click on a specific child/leaf node in the tree, and I use my tree reference to manually get other object references beneath it (the nodes within the tree), I cannot use the .Click() and .DblClick() functions on those child objects.
At that point, I can only use the child objects own methods.
It seems I would have to instead call the tree's event handler at that point, which requires using additional classes and I haven't figured out how to do that in test complete yet.
For example, when I record my actions into a script, it appears as:
Aliases.browser.BrowserWindow.(etc etc etc).Tree.Click(122, 104);
And this works fine.
However If I then use the Tree's own methods to get a specific node in the tree like in the example below, I cannot click the child node:
Aliases.browser.BrowserWindow.(etc etc etc).Tree
.getFirstNode().Click();
I can get the node just fine, but the Click() function doesn't work. I think this is because the Click() function is not actually a method of the tree or the tree nodes, it is a method that testcomplete is somehow overlaying, and since testcomplete didn't give me the reference to the node, it isn't there.
So, to summarize, how would you suggest I go about clicking on the specific tree node once I have found it?
Thanks!