gpt4 book ai didi

c# - TestStack.White 试图自动查找文本框

转载 作者:太空宇宙 更新时间:2023-11-03 13:20:00 24 4
gpt4 key购买 nike

Code with errors here

我正在使用包装器库 TestStack.White 以更简单的方式深入了解 Windows 自动化。我试图自动化一种在游戏启动器上输入用户名的方法。我不知道文本框名称,所以我尝试使用 SearchCriteria 方法来检索它。

由此我得到以下错误

  • The best overloaded method match for 'TestStack.White.UIItems.Finders.SearchCriteria.AndControlType(System.Windows.Automation.ControlType)'has some invalid arguments C:\Users\Steve\Documents\Visual Studio2013\Projects\SAML\Mod Loader\RunSA.xaml.cs 54 16

  • Argument 1: cannot convert from 'System.Type' to 'System.Windows.Automation.ControlType' C:\Users\Steve\Documents\VisualStudio 2013\Projects\SAML\Mod Loader\RunSA.xaml.cs 54 65

最佳答案

尝试使用

SearchCriteria.ByControlType(ControlType.Edit)

关于c# - TestStack.White 试图自动查找文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24661877/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com