问题描述
我是在编码的用户界面"中手动编写代码的.我有一个应用程序,其中有WinRow(在WinTable下) 窗户).当我单击WinRow时,只有它会显示为类似于下拉框的下拉箭头.我试图通过编码的UI进行监视.我手动选择了箭头"按钮并监视WinButton.我写了一个代码,但我收到了NotexistException.我被启用 箭头" buttonbut 我无法单击箭头按钮.我该如何点击 箭头" .
I was writing a code manually in Coded UI. I have an application in which i have WinRow(under WinTable Window). When I click on WinRow then only It will show as like Drop Down Arrow in combo box. I was tried to spy through coded UI. Manually I selected "Arrow" button and spy the WinButton. I wrote a code but I am getting NotexistException. I was enable "Arrow" buttonbut I was unable to click the arrow button. how can I click "Arrow" in combo box when I debug the code.
WinWindow winP =新的WinWindow();
winP.SearchProperties.Add(新的PropertyExpression(WinWindow.PropertyNames.Name,创建打印作业",PropertyExpressionOperator.Contains)));
WinWindow winC =新的WinWindow(winP);
winC.SearchProperties.Add(新的PropertyExpression(WinWindow.PropertyNames.Name,"PropertyGridView",PropertyExpressionOperator.Contains)));
WinTable tbP =新的WinTable(winC);
tbP.SearchProperties.Add(新的PropertyExpression(WinTable.PropertyNames.Name,属性窗口",PropertyExpressionOperator.Contains)));
tbP.DrawHighlight();
WinWindow winP = new WinWindow();
winP.SearchProperties.Add(new PropertyExpression(WinWindow.PropertyNames.Name, "Create Print Job", PropertyExpressionOperator.Contains));
WinWindow winC = new WinWindow(winP);
winC.SearchProperties.Add(new PropertyExpression(WinWindow.PropertyNames.Name, "PropertyGridView", PropertyExpressionOperator.Contains));
WinTable tbP = new WinTable(winC);
tbP.SearchProperties.Add(new PropertyExpression(WinTable.PropertyNames.Name, "Properties Window", PropertyExpressionOperator.Contains));
tbP.DrawHighlight();
WinRow wrow1 =新的WinRow(tbP);
wrow1.SearchProperties.Add(WinRow.PropertyNames.Name,文件组"));
wrow1.DrawHighlight();
Mouse.Click(wrow1); //可以单击WinRow
WinRow wrow1 = new WinRow(tbP);
wrow1.SearchProperties.Add(WinRow.PropertyNames.Name, "File Group");
wrow1.DrawHighlight();
Mouse.Click(wrow1); // Able to click WinRow
推荐答案
我认为该线程特定于Visual Studio测试工具论坛.因此,我正在帮助您将该话题直接移至该论坛.谢谢您的理解.
I think this thread is specific to Test Tool for Visual Studio forum. So I am helping you to move this thread directly into that forum. Thank you for your understanding.
此致
这篇关于如何在编码的ui的组合框中启用下拉箭头中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!