我正在编写一些测试,并尝试验证是否弹出了某些系统消息框。就像在http://www.dotnetperls.com/messagebox-show中一样。但是,MessageBox类用于创建消息框。我应如何捕获和验证生成的系统并对其进行操作?
例如:动作是:
1.click on some execute file.
2.validate a warning messagebox pop up
3.click on yes/no on the messagebox
有什么提示吗?
一种选择是使用White自动化框架。
例如:
Window messageBox = WindowFactory.Desktop
.DesktopWindows()
.Find(w => w.Title.Contains("MessageBoxTitle"));
Button ok = messageBox.Get<Button>(SearchCriteria.ByText("OK"));
ok.Click();
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句