Assert windows closed in Coded UI Tests

南楼画角 提交于 2019-12-13 04:43:10

问题


I'm developing a set of coded UI tests for a WPF project. Does anyone know how to assert that a window was closed? I can't seem to check any properties of the window after it is gone. Should I assert the UI element is null, maybe?


回答1:


The UITestControl class has a method called WaitForControlNotExist that did the trick!



来源:https://stackoverflow.com/questions/21489500/assert-windows-closed-in-coded-ui-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!