Access iOS Control Center using appium

后端 未结 7 1791
一整个雨季
一整个雨季 2021-01-01 23:48

I am trying to open the Control Center using appium and the following code:

    int halfWidth = driver.manage().window().getSize().width / 2;
    int screenH         


        
7条回答
  •  隐瞒了意图╮
    2021-01-01 23:57

    We can do this. I tried in Appium 1.4.13 and I am able to change settings.

    I used below code to change the settings in my 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();
    

提交回复
热议问题