android - 如何在@react-native-community/datetimepicker 中选择日期,同时在 android 中使用 detox 编写 e2e 测试用例?
问题描述
我正在使用 @react-native-community/datetimepicker 并尝试使用 Detox 编写一些 e2e 测试用例。我不知道如何在calendar
显示的日期选择器中选择特定日期。
我做了什么:
- 我已经查找了库中编写的测试用例,但他们设置了默认日期,并且他们通过使用选择了预期日期,
await testElement.tapAtPoint({x: 50, y: 200});
但我需要它更加动态,所以不能使用 tapAtPoint。 - 我还查看了 Detox 文档,他们有这种方法
setDatePickerDate(dateString: string, dateFormat: string): Promise<void>;
,但它仅适用于 android。
谁能帮我解决这个问题?谢谢!
解决方案
推荐阅读
- sql-server - SQL Server - 复制和修改一年的数据
- c# - 实体框架中的实体应该有一个填充列表,但它总是空的
- powershell - Powershell PSReadLine 历史
- python-3.x - 根据最多 4 个值过滤 python 中的字典列表的函数
- r - 在分组图中使用 ggpubr 绘制 p 值会导致错误
- python - 使用 RandomizedSearchCV 进行随机森林调优
- html - 绝对定位清除页脚
- javascript - 我的代码 javascript 函数 onchange() 有问题
- c# - 将一个简单的 json 对象转换为 (C#) 中的字典列表
- python - 在 python 3.x 中随机打印不同的值