如何在Coded ui中自动化日期时间选择器日历 [英] How to automate datetime picker calendar in Coded ui

查看:113
本文介绍了如何在Coded ui中自动化日期时间选择器日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在努力在Coded Ui中自动化Windows应用程序。

对于一个案例,我必须从dataTime选择器中选择日期但我面临的问题是将数据时间选择器日历处理为 

通过测试构建器无法获得日历的属性控制。

我也经历了各种博客但是没有得到正确的答案。

日历是非常常见的控制,我认为编码的ui应该正确识别它。

请建议是否有任何先进功能来处理dataTime选择器在编码的用户界面中$
需要帮助来处理它以从日历中选择愿望日期。


问候,


Vikram




Vikram

解决方案

Hi Vikram,


您正在开发哪个项目? Wpf或  UWP? 


如果是 Wpf ,您需要
测试模板中的编码ui测试项目




如果 UWP   windows universal 中的相应测试项目是:






我将以 wpf 为例:


 获取日期时间选择器的控件,如果下面的日期时间是下拉列表,我只需将鼠标光标放在控件上,然后按
" CTRL" +" i",然后我会得到它的属性:




如果是UWP应用程序,您只需要切换即可创建相应的测试项目,并且接下来的步骤与上面类似。



希望有所帮助。


请随时告诉我结果。




祝你好运,


Fletcher




















Hi,

I am working to automate windows application in Coded Ui.
For one case i have to pick the date from dataTime picker but I am facing problem to handle the datatime picker calendar as 
through test builder not able to get the property controls of calendar.
I also gone through various blogs but didn't get the proper answer.
Calendar is very common control,i think coded ui should recognise it properly.
Please suggest is there any advance feature to handle the dataTime picker in coded UI
Need help to handle it to pick the desire date from calendar.

Regards,

Vikram


Vikram

解决方案

Hi Vikram,

Which project are you developing? Wpf or UWP? 

If it's Wpf you need the coded ui test project in the Test template:

if it's UWP, the corresponding test project in windows universal is this:

I'll take wpf as example:

 to get the date time picker's control, if the like date time below which is a dropdown list, I just put the mouse cursor on the control, and press "Ctrl" + "i", then I will get its properties:

If it's UWP app, you will just need switch to create the corresponding Test project, and next steps is similar to above.

Hope it helps.

And please feel free to let me know the result.

Best regards,

Fletcher


这篇关于如何在Coded ui中自动化日期时间选择器日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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