Ios 无法在应用程序中使用滚动功能
我在IOS7中使用了Appium 0.15。我试图用下面的代码使用滚动功能Ios 无法在应用程序中使用滚动功能,ios,appium,Ios,Appium,我在IOS7中使用了Appium 0.15。我试图用下面的代码使用滚动功能 final JavascriptExecutor jsExecutor = (JavascriptExecutor) getDriver(); final Map<String, String> scrollObject = new HashMap<String, String>(); scrollObject.put("direction", "up");
final JavascriptExecutor jsExecutor = (JavascriptExecutor) getDriver();
final Map<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "up");
System.out.println("Scroll object:"+scrollObject.size());
jsExecutor.executeScript("mobile: scroll", scrollObject);
请帮助我解决此问题使用以下代码。它会起作用的
WebElement element = driver.findElement(By.id("android:id/select_dialog_listview"));
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("text", "The text you need to scroll to");
scrollObject.put("element",( (RemoteWebElement) element).getId());
driver.executeScript("mobile: scrollTo", scrollObject);
WebElement=driver.findElement(By.id(“android:id/select\u dialog\u listview”);
HashMap scrollObject=新建HashMap();
scrollObject.put(“文本”,“需要滚动到的文本”);
scrollObject.put(“element”,((RemoteWebElement)element.getId());
executeScript(“mobile:scrollTo”,scrollObject);
您正在使用旧版本的appium升级到最新版本以获得更大的功能集
更新至最新版本的appium 1.2.2以获得更广泛的功能集。@Parosh,上面的“mobile:scroll”/“mobile:scrollTo”已被折旧,请查看此视频,其中显示了最新版本的appium 1.5.3支持的命令,
WebElement element = driver.findElement(By.id("android:id/select_dialog_listview"));
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("text", "The text you need to scroll to");
scrollObject.put("element",( (RemoteWebElement) element).getId());
driver.executeScript("mobile: scrollTo", scrollObject);
"org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)"