c# - 在 Xamarin 自动化 UI 测试中按索引从 ListView 获取元素
解决方案
就我而言,我已将 AutomationId 分配给侧 DataTemplate 中的第一个视图。所以我可以按索引点击特定的单元格。
这将获取 ListView 中的所有单元格:
app.Tap(c => c.Marked("TeamListCell"));
您可以像这样按索引点击特定项目:
app.Tap(c => c.Marked("TeamListCell").Index(0));
推荐阅读
- vue.js - 回到vue中的页面后currentPage的状态正在改变
- powershell - 最大化 Chrome 窗口
- objective-c - Obj-C - 以编程方式将 NSWindow Appearance 设置为 NSAppearanceNameVibrantDark,不起作用
- regex - ORACLE 查询:当值名称中包含“/”时选择文本
- path - Ansible - 将环境路径设置为库存变量
- php - How a placeholder in a prepared statement calls a value in an associative array?
- vba - excel - 根据图例更改颜色条形图
- javascript - 隐藏当 document.click 时,显示当搜索框点击时(php mysql)
- vba - 带有like语句的OUTLOOK vba过滤器
- laravel - 使用模式窗口更新行后刷新数据表