简体   繁体   English

CodedUI测试构建器选择项

[英]CodedUI Test Builder Selection Items

When I use CUIT to select the item that will be coded it works, 当我使用CUIT选择要编码的项目时,它可以工作,

but when I use another app (maybe coded in JAVA) it won't work, the Add assertions can't select the Menu or the button , it selects all the window and it also can't define the Control Type . 但是,当我使用其他应用程序(可能用JAVA编码)时,它将无法工作, Add assertions无法选择Menubutton ,它会选择所有窗口,并且也无法定义Control Type

Screenshot of the problem 问题的屏幕截图

Update : If I need to log in the app and assert some data username and Password , the Add Assertion can't select the textbox just select all the windows. 更新:如果我需要登录应用程序并声明一些数据usernamePassword ,则添加声明不能选择textbox只需选择所有窗口。
Update 2 : I work with start records on Coded UI Test Builder, and this the result code (Because I cant select the item), This code click on Menu Strip and the an item called Export, then a item with choice export to Excel 更新2:我使用编码的UI测试生成器上的开始记录,这是结果代码(因为我无法选择该项目),此代码单击菜单栏和一个名为导出的项目,然后将一个选项导出到Excel

public void ExportExcel()
    {
        #region Variable Declarations
        WinClient uIMainthinkorswimbuildClient = this.UIMainthinkorswimbuildWindow.UIMainthinkorswimbuildClient;
        #endregion

        // Click 'Main@thinkorswim [build 1878.37]' client
        Mouse.Click(uIMainthinkorswimbuildClient, new Point(1358, 56));

        // Click 'Main@thinkorswim [build 1878.37]' client
        Mouse.Click(uIMainthinkorswimbuildClient, new Point(1263, 254));

        // Click 'Main@thinkorswim [build 1878.37]' client
        Mouse.Click(uIMainthinkorswimbuildClient, new Point(1137, 276));
    }

Java controls are not supported by CodedUI. CodedUI不支持Java控件。 You would have to try to write an extension for the custom controls. 您将不得不尝试编写自定义控件的扩展名。

You can find more information on that here... http://blogs.msdn.com/b/gautamg/archive/2010/01/05/1-introduction-to-coded-ui-test-extensibility.aspx 您可以在此处找到更多有关此的信息... http://blogs.msdn.com/b/gautamg/archive/2010/01/05/1-introduction-to-coded-ui-test-extensibility.aspx

The technology of the controls you are trying to click are most likely not Web or MSAA. 您尝试单击的控件的技术很可能不是Web或MSAA。

If you are trying to use CodedUI with Excel (looking at your code) then you can find an example extension created for Excel here... http://blogs.msdn.com/b/gautamg/archive/2010/01/05/3-introducing-sample-excel-extension.aspx 如果您尝试将CodedUI与Excel结合使用(查看您的代码),则可以在此处找到为Excel创建的示例扩展... http://blogs.msdn.com/b/gautamg/archive/2010/01/05 /3-introducing-sample-excel-extension.aspx

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

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