Cha*_*man 13 automation swipe ios appium control-center
我正在尝试使用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
Run Code Online (Sandbox Code Playgroud)
应用程序只是从底部向上绘制屏幕(使用坐标输入),而不是打开控制中心.任何人都知道如何使用appium和滑动(或任何其他方式)打开控制中心?
谢谢,查理
我们可以完成这个。我在Appium 1.4.13中尝试过,并且能够更改设置。
我使用以下代码更改了iPadAir2中的设置。
int height = driver.findElementByClassName("UIAWindow").getSize().getHeight();
int width = driver.findElementByClassName("UIAWindow").getSize().getWidth();
driver.swipe(width-100, height, width-100, height-200, 500);
driver.findElementByAccessibilityId("Wi-Fi").click();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3072 次 |
| 最近记录: |