首页 新闻 赞助 找找看

UI测试,自定义的下拉框,不能识别,怎么办?

0
悬赏园豆:30 [已关闭问题] 关闭于 2020-02-18 10:12

使用vs的UI测试,点击多个自定义的下拉框(是个组合控件),下拉列表都识别为同一个控件
请问怎么处理?

[GeneratedCode("编码的 UI 测试生成器", "11.0.50727.1")]
public class UIItemWindow3 : WinWindow
{

    public UIItemWindow3()
    {
        #region 搜索条件
        this.SearchProperties[WinWindow.PropertyNames.AccessibleName] = "DropDown";
        this.SearchProperties.Add(new PropertyExpression(WinWindow.PropertyNames.ClassName, "WindowsForms10.Window", PropertyExpressionOperator.Contains));
        #endregion
    }
    
    #region Properties
    public WinMenu UIDropDownMenu
    {
        get
        {
            if ((this.mUIDropDownMenu == null))
            {
                this.mUIDropDownMenu = new WinMenu(this);
                #region 搜索条件
                this.mUIDropDownMenu.SearchProperties[WinMenu.PropertyNames.Name] = "DropDown";
                #endregion
            }
            return this.mUIDropDownMenu;
        }
    }
    #endregion
    
    #region Fields
    private WinMenu mUIDropDownMenu;
    #endregion
}
低调超哥的主页 低调超哥 | 菜鸟二级 | 园豆:202
提问于:2020-02-16 16:00
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册