今天在用WinAppDriver进行UI自动化开发测试时,发现DatePicker中的Checkbox并不支持点击选择.网上百度谷歌都没有找到答案.

WinAppDriver DatePicker中的checkbox选中问题 空格键

折腾大半天,后面才找到解决的思路,那就是发送空格键选其选中.具体就是先将DatetimePicker焦点,然后发送空格键.

大致代码如下:DatePicker.Click();DatePicker.SendKeys(Keys.Space);

EnglishInfo:

Today, when using winappdriver for UI automation development test, I found that the checkbox in datepicker does not support click selection Online Baidu and Google have not found the answer
Toss about for a long time, only to find a solution later, that is to send the space bar to select it Specifically, first focus the datetimepicker and then send the spacebar
The approximate code is as follows: DatePicker.Click(); DatePicker.SendKeys(Keys.Space);

以上就是【WinAppDriver DatePicker中的checkbox选中问题C#】的全部内容了,欢迎留言评论进行交流!

赞(1) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论