【问题标题】:How to scroll in mobile testing (appium and webdriverio) in android within coordinates如何在坐标内的android中滚动移动测试(appium和webdriverio)
【发布时间】:2022-07-09 03:04:24
【问题描述】:

我必须处理坐标,因为我要在不同的设备上运行测试。 问题是在某些测试中,我必须滚动到一个元素,我知道在 ios 中即使未显示该元素我也可以单击,但在 android 中我需要向上或向下滚动,然后使用它执行操作. 我正在使用 webdriverIo、appium 和 javascript。

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: javascript android automated-tests appium


【解决方案1】:

您可以使用两个选项 1- 等待 $('andorid=new UiScrollable(new UiSelector().scrollable(true)).scrollTextView("[your element here]")').click();

2- 期望 $('andorid=new UiScrollable(new UiSelector().scrollable(true)).scrollToEnd(1,5)')

【讨论】:

    猜你喜欢
    • 2022-09-23
    • 2020-01-25
    • 2018-08-23
    • 2021-02-28
    • 2016-08-23
    • 2020-06-27
    • 2020-11-24
    • 2021-11-27
    • 2016-12-27
    相关资源
    最近更新 更多