lhuang5
11 years agoOccasional Contributor
Use object or UI control to test WPF UI?
Hi,
We are planningt o update GUI to WPF step by step in our desktop software. Now I am working on writing scripts for WPF controls in our new WPF UI. But I am a little confused about what is the right way to test WPF controls.This application is closed for me and I have no idea about its source code.
For example, we can spy one WPF object "TreeView" treeViewObj. We can access to each tree node by treeNode = treeViewObj.Items.Item(index).
WIth this, we can check treeNode.DisplayName. Actually this DisplayName is in its child contol "TextBlock". If I need to know this name in UI, should I find THAT "TextBlock" UI control or just use DisplayName from found "TreeView" object?
Are they the same or different?
Thanks
Best regards,
Liping
We are planningt o update GUI to WPF step by step in our desktop software. Now I am working on writing scripts for WPF controls in our new WPF UI. But I am a little confused about what is the right way to test WPF controls.This application is closed for me and I have no idea about its source code.
For example, we can spy one WPF object "TreeView" treeViewObj. We can access to each tree node by treeNode = treeViewObj.Items.Item(index).
WIth this, we can check treeNode.DisplayName. Actually this DisplayName is in its child contol "TextBlock". If I need to know this name in UI, should I find THAT "TextBlock" UI control or just use DisplayName from found "TreeView" object?
Are they the same or different?
Thanks
Best regards,
Liping
- If the app is "closed to you" it may be a problem as the app should be built in Debug mode so TC can have access to all the names etc.