I can not access an object in my testcase. The object is a Tab, attached to a (Sub)Window in my application. Befor and after the Testcase the Tab and the window the tab is attached to is found by the object spy fine, but while the testcase runs the Error below comes up .
Cannot find the "[ActiveX]" object's parent "[Window]" (class Window). Verify that parent properties match an object currently displayed in your application.
I access the object so :
VbWindow("ApplicationWindow").Window("SubWindow").ActiveX("Tab")
I am new to UFT, so I searched a while and found some solutions but they seem not to work for me, because they always related to browser testing, not application.
Warning: Long explanation follows, you can skip to the last paragraph for a suggested quick win.
When UFT identifies objects it does so from the top down, your object hierarchy is:
VbWindow("ApplicationWindow").Window("SubWindow").ActiveX("Tab")
And UFT said that:
Cannot find the "[ActiveX]" object's parent "[Window]" (class Window).
This means that id did find VbWindow("ApplicationWindow")
but could not find the Window("SubWindow")
. Try highlighting the VbWindow
to make sure that UFT is identifying the object you expect. Then use the object spy to inspect the window you think UFT should find. Then compare the properties in the object repository to those of the window you see and find how these descriptions differ.
As a shortcut you can try using Maintenance Run Mode which should do these steps for you and suggest a way to fix the test.