如何滚动到iOS设备的元素(Appium+Selenium)?



我有一个适用于Android的命令,但我不知道如何在iOS上实现它。

driver.findElementByAndroidUIAutomator("new UiScrollable("new  
UiSelector())".scrollIntoView(text("Radio Group"));");

使用 javascript executionr。

JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<>();
scrollObject.put("direction", "down");
js.executeScript("mobile: scroll", scrollObject);

如果要向上滑动,请将方向更改为向上

最新更新