注意注意!ItemStatus 在VS2010的CUIT里面是没有的!需要2013以上的版本才可使用. 公司新程序使用WPF制作,但使用CodedUI Test进行自动化测试的时候,很多控件抓取不到其属性. 比如某输入框的逻辑是当输入错误值的时候,BorderBrush为红色. 当使用CodedUI Test测试发现将其放到WpfEdit并没有BorderBrush的这个属性,无法进行行为判断. 参考 How To: Validate background color or other cust…
今天运行在windows平板上的程序,有个功能是弹出子窗体,点弹出窗体的关闭按钮,要点好几次才能触发.网上找了找,也有人与我类似的情形. 解决方法如下: public static void DisableWPFTabletSupport() { // Get a collection of the tablet devices for this window. TabletDeviceCollection devices = System.Windows.Input.Tablet.Tablet…