今天在用WinAppDriver进行UI自动化开发测试时,发现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#】的全部内容了,欢迎留言评论进行交流!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
8. 精力有限,不少源码未能详细测试(解密),不能分辨部分源码是病毒还是误报,所以没有进行任何修改,大家使用前请进行甄别
丞旭猿论坛
暂无评论内容