HP-UFT WPF TextBlock object capture

耗尽温柔 提交于 2019-12-24 00:57:41

问题


I am working on a WPF application where we have to automate testing. This work fine for many components but we struggle to check a summary page where we use TextBlock to display our data.

The WPF TextBlock is not found by the HP tool. Thus we cannot check the values that we display.

We tried the following solutions but without success:

  • Change x:Name in Name (not the best idea right, but we tried all!)
  • AutomationProperties.AutomationId on the TextBloc
  • AutomationProperties.Name
  • Make the TextBlock focusable
  • The solution presented here: WPF Tutorial Solution

None of them Worked and we are currently blocked.

Has anyone experience with this? Is there a clean solution to solve this issue?

What we need: access TextBlock content, in particular Text from HP UFT Tool.


回答1:


Here the correct answer:-

1) Open UFT 2) Open your wfp ".exe" file in UFT and run. (YourwpfFile.exe) 3) then you can able to identify the WFP window using object spy.



来源:https://stackoverflow.com/questions/36159320/hp-uft-wpf-textblock-object-capture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!