我正在使用以下命令: browser.scroll( '#登录');
我收到此错误 - 尚未实施。请帮助我们:http://appium.io/get-involved.html
答案 0 :(得分:0)
public void scroll()
{
Dimension dimensions = driver.manage().window().getSize();
System.out.println(dimensions);
Double screenHeightStart = dimensions.getHeight() * 0.5;
int scrollStart = screenHeightStart.intValue();
Double screenHeightEnd = dimensions.getHeight() * 0.2;
int scrollEnd = screenHeightEnd.intValue();
((IOSDriver<MobileElement>) driver).swipe(0, scrollStart, 0, scrollEnd, 1000);
}
答案 1 :(得分:0)
使用此命令:
browser.execute("mobile: scroll", {direction: 'down'});