在Karate框架中有一种用于Web UI测试的向下滚动方法,但在移动框架中不起作用。你能告诉我们如何在移动空手道框架中使用向下滚动功能吗?
提前感谢
您可以尝试使用driver.script()
的移动命令等替代选项
例如:
driver.script("mobile: scroll", { "direction" : "down"})
对于iOS,请参阅:https://github.com/appium/appium-xcuitest-driver#mobile-滚动
对于android,请参阅:https://github.com/appium/appium-uiautomator2-driver#mobile-滚动
如果您需要elementId
,请尝试:
def locatorElementId = driver.elementId('<locator>')