运行编码ui解决方案时如何避免冻结问题 [英] How to avoid freezing issue while running coded ui solution
问题描述
我在与编码ui相关的项目中有大量测试。当我使用MSTest.exe运行项目dll时,系统在随机位置冻结。如果我单击windows + q,测试将再次开始运行,没有任何问题。如果我离开它而不按任何键
它会给出计时问题。任何人都可以解释为什么会发生这种情况。
I have bunch of tests in a project related to coded ui. When I run the project dll using MSTest.exe the system is freezing at random places. If I click windows+q the test is again start running without any issues. If I leave it without pressing any keys it is giving timing issue. Can anyone explain why this is happening.
推荐答案
嗨朋友,
欢迎来到MSDN论坛。
Welcome to MSDN forum.
>> 如果我单击windows + q,测试将再次开始运行,没有任何问题。如果我在没有按任何键的情况下离开它就会出现计时问题。
>> If I click windows+q the test is again start running without any issues. If I leave it without pressing any keys it is giving timing issue.
您是否正在测试通用Windows平台(UWP)应用程序(比如cortana)在Windows 10上?
Are you testing Universal Windows Platform(UWP) app (like cortana) on windows 10 ?
根据你的描述,我担心你的问题是由于按下
后可能找到的那个控件造成的windows + q", ,它会显示窗口菜单。
According your description, I’m afraid your issue is caused by that one control might be found after pressing "windows+q", which will show up the window menu.
所以我建议你先检查你的测试代码确定哪里需要热键" win + q ",那么您只需在此处添加此操作即可。
So I suggest you have a check your test code first to make sure where needs the hotkey "win + q", then you'll just add this action there.
Keyboard.SendKeys("{LWIN}Q");
上面的代码与 windows徽标键+ q 的行为相同,将其添加到您的代码中后需要它。
the code above will behave the same as windows logo key + q , after adding this into your code where need it.
如果有效,请告诉我。如果您的代码可以,请随时与我们分享您的代码示例。
Please let me know if it works. And please feel free to shares us a sample of your code if it's ok for you.
期待您的反馈。
祝你好运,
Fletcher
这篇关于运行编码ui解决方案时如何避免冻结问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!