空手道移动 - 空手道中有没有办法执行 TouchActions 或 scrollIntoView
Karate Mobile - Is there a way in Karate to perform TouchActions or scrollIntoView
我们正在探索用于移动应用程序测试的空手道。在应用程序的某些部分,我们需要向下滚动到 select 选项或需要使用 TouchActions 来按下后退按钮。空手道中有没有办法实现 TouchActions 或 scrollIntoView。
谢谢,
谢卡尔
目前不支持 TouchActions
,但 mobile commands 应该可以在 develop
分支中使用。
请求您查看 https://github.com/intuit/karate/wiki/Developer-Guide 以构建它并验证它是否有效或应该在下一个 RC 构建中可用 0.9.6.RC4
使用移动命令滚动:
script("mobile: scroll", {direction: 'down'} )
因为你没有提到它是 Android
还是 iOS
,如果这适用于你的驱动程序类型,请参考移动命令页面
谢谢巴布
如果我们使用 driver.script 如下所示,它会起作用;
driver.script("mobile: scroll", { "strategy" : "accessibility id", "selector": "Lists"})
“列表”在这里是它的定位器。
唯一的限制是在此卷轴中使用有限的选择器支持。
Android 你只能使用:accessibility id, class name, -android uiautomator
iOS 你只能使用:predicateString
我们正在探索用于移动应用程序测试的空手道。在应用程序的某些部分,我们需要向下滚动到 select 选项或需要使用 TouchActions 来按下后退按钮。空手道中有没有办法实现 TouchActions 或 scrollIntoView。
谢谢, 谢卡尔
TouchActions
,但 mobile commands 应该可以在 develop
分支中使用。
请求您查看 https://github.com/intuit/karate/wiki/Developer-Guide 以构建它并验证它是否有效或应该在下一个 RC 构建中可用 0.9.6.RC4
使用移动命令滚动:
script("mobile: scroll", {direction: 'down'} )
因为你没有提到它是 Android
还是 iOS
,如果这适用于你的驱动程序类型,请参考移动命令页面
谢谢巴布 如果我们使用 driver.script 如下所示,它会起作用;
driver.script("mobile: scroll", { "strategy" : "accessibility id", "selector": "Lists"}) “列表”在这里是它的定位器。 唯一的限制是在此卷轴中使用有限的选择器支持。
Android 你只能使用:accessibility id, class name, -android uiautomator iOS 你只能使用:predicateString