使用Coded UI测量基于桌面的应用程序的响应时间,并等待完整的应用程序加载 [英] Measuring the response time of an desktop based application using Coded UI and wait till the complete application loads

查看:83
本文介绍了使用Coded UI测量基于桌面的应用程序的响应时间,并等待完整的应用程序加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Coded UI测量基于桌面的应用程序的响应时间,并等待完整的应用程序加载 

Measuring the response time of an desktop based application using Coded UI and wait till the complete application loads 

推荐答案

嗨朋友,

我可以使用下面的代码来测试我在机器上启动IE浏览器的时间:

I could use the code below to test the time I launch IE browser in my machine:

[TestMethod]
        public void CodedUITestMethod1()
        {

            var window = new BrowserWindow();

       

            Playback.PlaybackSettings.SearchTimeout = 0;


            var beginTime = DateTime.Now.Second;

            BrowserWindow.Launch();


       
            var endTime = DateTime.Now.Second;

            var totalTime = endTime - beginTime;

            Console.WriteLine(totalTime.ToString());



                      }

我想你会明白的。

希望它有所帮助。

祝你好运,

Fletch


这篇关于使用Coded UI测量基于桌面的应用程序的响应时间,并等待完整的应用程序加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆