编码的用户界面:如何在台式机上自动执行100次视频而不提及脚本中的时间延迟? [英] Coded UI:How to automate video on desktop for 100 times without mentioning time delay in script?

查看:75
本文介绍了编码的用户界面:如何在台式机上自动执行100次视频而不提及脚本中的时间延迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图自动执行100次在桌面上播放的视频以重复播放.我使用录制和播放"选项来自动执行在台式机上显示的视频.当尝试自动执行时,它只是打开和关闭电影和电视.窗口并显示 我的测试用例通过了.我试图通过在脚本中提供一些延迟时间来播放该视频,例如"Thread.Sleep(50000);",因为播放时间为5分钟,我就这样提到了.成功100次但是很难 我希望每次都能计算出时间延迟并在脚本中提及.我希望有一个解决方案,可以在整个持续时间内重复播放视频,而不会按照我的意愿给我n次延迟时间.

I have tried to automate a video present on desktop for 100 times to play repeatedly.I have used Record and playback option to automate the video present on my desktop.When I have tried to automate it just opens and closes films and tv window and showed my test case as passed.I have tried to play that video by giving some time delay in script as"Thread.Sleep(50000);"as it 5 min duration video I have mentioned it as like that.This time video has played successfully for 100 times.But it is difficult for me everytime to calculate time delay and mention in script.I expect a solution for this to play video repeatedly for complete duration without giving time delay by me for n number of times as per my desire.

请求为此提供解决方案.

Request to provide solution for this.

谢谢

A.Manoj kumar.

A.Manoj kumar.

推荐答案

嗨A.Manoj,

Hi A.Manoj,

如果您不想使用"Thread.Sleep()"或"Playback.Wait()",则有一个解决此问题的方法.

There is a workaround for this issue if you don’t want use "Thread.Sleep()" or "Playback.Wait()".

您需要使用 mstest 命令行工具和任务计划程序.下面的文章仅显示了如何做到这一点.

You need use mstest command line tool and task scheduler. The following article just shows how to make it.

http://pjdecarlo.com /2011/11/schedule-coded-ui-test-to-execute-at-a-specific-time.html

根据您的情况,您可以通过编码的UI记录一次系列动作,以获取相应的dll文件并在任务计划程序中设置特定时间.

According to your case, you could record series actions once by coded UI to get corresponding dll file and set the specific time in task scheduler.

最诚挚的问候

抓取


这篇关于编码的用户界面:如何在台式机上自动执行100次视频而不提及脚本中的时间延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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