<bdo id='qBGSf'></bdo><ul id='qBGSf'></ul>
<tfoot id='qBGSf'></tfoot>
    <i id='qBGSf'><tr id='qBGSf'><dt id='qBGSf'><q id='qBGSf'><span id='qBGSf'><b id='qBGSf'><form id='qBGSf'><ins id='qBGSf'></ins><ul id='qBGSf'></ul><sub id='qBGSf'></sub></form><legend id='qBGSf'></legend><bdo id='qBGSf'><pre id='qBGSf'><center id='qBGSf'></center></pre></bdo></b><th id='qBGSf'></th></span></q></dt></tr></i><div id='qBGSf'><tfoot id='qBGSf'></tfoot><dl id='qBGSf'><fieldset id='qBGSf'></fieldset></dl></div>

    <small id='qBGSf'></small><noframes id='qBGSf'>

  • <legend id='qBGSf'><style id='qBGSf'><dir id='qBGSf'><q id='qBGSf'></q></dir></style></legend>

      1. 如何在 C# 中验证消息框弹出窗口?

        时间:2023-09-17
        <i id='zrqx6'><tr id='zrqx6'><dt id='zrqx6'><q id='zrqx6'><span id='zrqx6'><b id='zrqx6'><form id='zrqx6'><ins id='zrqx6'></ins><ul id='zrqx6'></ul><sub id='zrqx6'></sub></form><legend id='zrqx6'></legend><bdo id='zrqx6'><pre id='zrqx6'><center id='zrqx6'></center></pre></bdo></b><th id='zrqx6'></th></span></q></dt></tr></i><div id='zrqx6'><tfoot id='zrqx6'></tfoot><dl id='zrqx6'><fieldset id='zrqx6'></fieldset></dl></div>
        <legend id='zrqx6'><style id='zrqx6'><dir id='zrqx6'><q id='zrqx6'></q></dir></style></legend>

            <tbody id='zrqx6'></tbody>

              <tfoot id='zrqx6'></tfoot>

              <small id='zrqx6'></small><noframes id='zrqx6'>

                • <bdo id='zrqx6'></bdo><ul id='zrqx6'></ul>

                  本文介绍了如何在 C# 中验证消息框弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在编写一些测试并尝试验证某些系统消息框正在弹出.就像在 http://www.dotnetperls.com/messagebox-show 中一样.但是,MessageBox 类用于创建消息框.我应该如何捕获和验证系统生成的并对其进行操作?

                  I was writing some tests and try to validate that some system messagebox is popping up. Like in http://www.dotnetperls.com/messagebox-show. However, the class MessageBox is for creating the messagebox. How shall I capture and validate an system generated one and operate on it?

                  例如:动作是:

                      1.click on some execute file.
                      2.validate a warning messagebox pop up
                      3.click on yes/no on the messagebox
                  

                  有什么提示吗?

                  推荐答案

                  一种选择是使用 White自动化框架.

                  One choice is to use White automation framework.

                  例如:

                  Window messageBox = WindowFactory.Desktop
                                                   .DesktopWindows()
                                                   .Find(w => w.Title.Contains("MessageBoxTitle"));
                  Button ok = messageBox.Get<Button>(SearchCriteria.ByText("OK"));
                  ok.Click();
                  

                  这篇关于如何在 C# 中验证消息框弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何对与 VS DOM 交互的 Visual Studio 插件进行单元测试 下一篇:代码覆盖结果窗口中的额外类

                  相关文章

                  <tfoot id='630d3'></tfoot>

                  1. <small id='630d3'></small><noframes id='630d3'>

                  2. <i id='630d3'><tr id='630d3'><dt id='630d3'><q id='630d3'><span id='630d3'><b id='630d3'><form id='630d3'><ins id='630d3'></ins><ul id='630d3'></ul><sub id='630d3'></sub></form><legend id='630d3'></legend><bdo id='630d3'><pre id='630d3'><center id='630d3'></center></pre></bdo></b><th id='630d3'></th></span></q></dt></tr></i><div id='630d3'><tfoot id='630d3'></tfoot><dl id='630d3'><fieldset id='630d3'></fieldset></dl></div>
                    <legend id='630d3'><style id='630d3'><dir id='630d3'><q id='630d3'></q></dir></style></legend>
                        <bdo id='630d3'></bdo><ul id='630d3'></ul>