mmcdonald
14 years agoOccasional Contributor
address object without a unique name
Hi there,
I am testing a product and have a problem where I need to click a button in a dialog box but the button does not have a unique name in the object tree.
If I open the object browser when the dialog box is open I can see there are two items called Sys.Process("Designer").Dialog("Options").Button("Finish"). One is the actual finish button I want to click, the other is something which is not visible on screen. So I have a line in my code that says:
Call Designer.Options.btn_Finish.ClickButton()
(where that maps to the above name). When I playback the test script however, TestComplete never selects the finish button, and so the button click does nothing, the dialog box remains open and the rest of the test fails to proceed.
How can I identify the actual button I want in a case like this? Attached is a screen clip of the object tree
I am testing a product and have a problem where I need to click a button in a dialog box but the button does not have a unique name in the object tree.
If I open the object browser when the dialog box is open I can see there are two items called Sys.Process("Designer").Dialog("Options").Button("Finish"). One is the actual finish button I want to click, the other is something which is not visible on screen. So I have a line in my code that says:
Call Designer.Options.btn_Finish.ClickButton()
(where that maps to the above name). When I playback the test script however, TestComplete never selects the finish button, and so the button click does nothing, the dialog box remains open and the rest of the test fails to proceed.
How can I identify the actual button I want in a case like this? Attached is a screen clip of the object tree