简体   繁体   English

如何通过UI Automation C#发送Sellect All命令

[英]How to Send sellect all command by ui automation c#

We are working on UI Automation for the third party software. 我们正在为第三方软件开发UI自动化。 And we are firing button by the invoke method. 我们通过invoke方法触发按钮。

AutomationElement appElement = rootElement.FindFirst(TreeScope.Children, condition);
AutomationElement Addbutton = GetElementByNameProperty(appElement, "Add");
if (Addbutton != null)
{
  ClickElement(Addbutton);
}

Now i want to fire select all or (ctrl+A) command for selecting the element of the third party software. 现在我要触发全选或(ctrl + A)命令来选择第三方软件的元素。 How to possible by UI automation? 如何通过UI自动化? or Can I fire command of some menu? 或我可以触发某些菜单的命令吗? for example (Edit> Select All). 例如(编辑>全选)。 Can I fire select all command by the UI automation? 我可以通过UI自动化触发全选命令吗? Please help me. 请帮我。 thanks 谢谢

If you are just trying to automate sending the command Ctrl+A, you may want to check out the question below. 如果您只是想自动发送Ctrl + A命令,则可能需要查看以下问题。 One of the suggestions is to use SendKeys and it works for me. 建议之一是使用SendKeys,它对我有用。

How to send keys Control + A + B? 如何发送键Control + A + B? (keep Control modifier "pressed") (保持控制修饰符“按下”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM