编码的UI不使用为支持UIA而编写的Win32应用程序的自动化ID [英] Coded UI not using Automation ID for Win32 app that is written to support UIA

查看:262
本文介绍了编码的UI不使用为支持UIA而编写的Win32应用程序的自动化ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我试图实现(学习)如何使用IRawElementProviderSimple并从"UI自动化简单提供程序示例"复制了大部分代码,请参阅下面的链接以获取源代码。我还将以下内容添加到Provider.cpp

I was trying to implement (learn) how to use IRawElementProviderSimple and have copied most of the code from "UI Automation simple provider sample', see link below for the source code. I have also added the following into Provider.cpp

else if (propertyId == UIA_AutomationIdPropertyId)
{
    pRetVal->vt = VT_BSTR;
    pRetVal->bstrVal = SysAllocString(L"This.Is.My.Automation.Id");
}




简而言之,自定义控件现在有一个自动化ID。我遇到的问题是Coded UI正在将控件检测为MSAA因此不使用AutomationID。有人可以提供有关内容的输入是使用Coded UI进行本机应用程序的最佳方式
实现UI自动化提供?

In short, the custom control now has an Automation ID. The issue I am having is that Coded UI is detecting the control as MSAA therefore not using AutomationID. Can someone please provide input on what is the best way to use Coded UI for native applications that implements UI Automation Provides?



链接:


https://code.msdn.microsoft.com/windowsdesktop/UI-Automation-Simple-735d36a5

https://code.msdn.microsoft.com/windowsdesktop/UI-Automation-Simple-735d36a5


根据建议重新发布:

Repost from as advised:


https://social.msdn.microsoft.com/Forums/en-US/f200c4af-26f9-4244-9361-815dfaa0f868/coded-ui-not-using-automation-id -for-win32-app-that-to-support-support-uia?forum = csharpgeneral

https://social.msdn.microsoft.com/Forums/en-US/f200c4af-26f9-4244-9361-815dfaa0f868/coded-ui-not-using-automation-id-for-win32-app-that-is-written-to-support-uia?forum=csharpgeneral


yY

推荐答案

我试图实现(学习)如何使用IRawElementProviderSimple并从"UI自动化简单提供程序示例"复制了大部分代码,请参阅下面的链接以获取源代码。我还在Provider中添加了以下内容.cpp

I was trying to implement (learn) how to use IRawElementProviderSimple and have copied most of the code from "UI Automation simple provider sample', see link below for the source code. I have also added the following into Provider.cpp

else if (propertyId == UIA_AutomationIdPropertyId)
{
    pRetVal->vt = VT_BSTR;
    pRetVal->bstrVal = SysAllocString(L"This.Is.My.Automation.Id");
}

简而言之,自定义控件现在具有自动化ID。我遇到的问题是Coded UI正在将控件检测为MSAA,因此不使用AutomationID。有人可以提供有关使用编码UI的本地应用程序的最佳方法的输入
实现UI自动化提供?

In short, the custom control now has an Automation ID. The issue I am having is that Coded UI is detecting the control as MSAA therefore not using AutomationID. Can someone please provide input on what is the best way to use Coded UI for native applications that implements UI Automation Provides?

链接:

https://code.msdn.microsoft.com/windowsdesktop/UI-Automation-Simple-735d36a5

https://code.msdn.microsoft.com/windowsdesktop/UI-Automation-Simple-735d36a5


这篇关于编码的UI不使用为支持UIA而编写的Win32应用程序的自动化ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆