QTP (QuickTest Professional) を使用して、レガシー C++ アプリケーションを自動テストしようとしています。
ただし、アプリのメイン ウィンドウは、いくつかの同一のパネルで構成されています。各パネルには固有のタイトルがあります。
Spy++ (DevStudio に付属) でウィンドウを表示すると、次のように表示されます。
+ Window <hwnd> "Window Title" taskwindowclass
+ Window <hwnd> "Panel A" childwindowclass
+ Window <hwnd> "OK" Button
+ Window <hwnd> "Panel B" childwindowclass
+ Window <hwnd> "OK" Button
ただし、QTP の Object Spy では、階層は次のように表示されます。
+ Window: Window Title
+ WinButton: OK
中間パネルがあることさえ示していません。
各コントロールを識別するためにウィンドウの「パス」を取得する方法を知っている人はいますか? つまり、コントロールは次のように識別します。
Button A: "Window Title/Panel A/OK"
Button B: "Window Title/Panel B/OK"