【发布时间】:2015-09-03 23:58:26
【问题描述】:
我正在尝试使用 appium 和以下代码打开控制中心:
int halfWidth = driver.manage().window().getSize().width / 2;
int screenHeight = driver.manage().window().getSize().height;
driver.swipe(halfWidth, screenHeight-5, halfWidth, screenHeight-300, 500); // driver is instance of IOSDriver
应用程序无需打开控制中心,而是简单地从底部向上绘制屏幕(使用坐标输入)。有人知道如何使用 appium 和滑动(或任何其他方式)打开控制中心吗?
谢谢,查理
【问题讨论】:
-
看 swipe() 方法的细节,我怀疑可能是因为我们按下,然后移动,而不是从头开始移动......但我会等待看看其他人可以确认一下。
标签: ios automation swipe appium control-center