【问题标题】:TestStack.White trying to automate finding textboxTestStack.White 试图自动查找文本框
【发布时间】:2014-08-30 23:06:21
【问题描述】:

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

从这里我得到了以下错误

  • 'TestStack.White.UIItems.Finders.SearchCriteria.AndControlType(System.Windows.Automation.ControlType)'的最佳重载方法匹配 有一些无效的参数 C:\Users\Steve\Documents\Visual Studio 2013\Projects\SAML\Mod Loader\RunSA.xaml.cs 54 16

  • 参数 1:无法从 'System.Type' 转换为 'System.Windows.Automation.ControlType' C:\Users\Steve\Documents\Visual Studio 2013\Projects\SAML\Mod Loader\RunSA.xaml.cs 54 65

【问题讨论】:

    标签: c# wpf automation


    【解决方案1】:

    尝试使用

    SearchCriteria.ByControlType(ControlType.Edit)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-26
      • 1970-01-01
      • 2011-11-04
      • 1970-01-01
      • 2016-03-14
      • 1970-01-01
      相关资源
      最近更新 更多