Unable to Find the element in control center of iOS real device


For me control center elements such as wifi and air plane mode etc is not accessible untill some pop up comes on it. I get its reference after some pop up is visible on top of it. So please help in this regard.

I m using appium 1.4.13

Edit: updated screen shot

Dont think you can find elements in iOS outside of your app. If you want you can use TouchAction to do whatever you need to change in there, using % coordinates.

I use it to enable/disable WiFi and airplane mode

Hello @Telmo_Cardoso in my first pick can you see i am able to access it when system generated pop up appears on top of it.

However can you let me know usage of method of % to find location?

In your screen I cannot see that you can automate the control view.There are several UIAWindow there but, cannot see if there are elements inside those and what elements.

About the %, just go trial and error in arc (ruby) or debug mode (java) it will be easy to get there. In ruby you have methods that receive %. In java you can make them yourself, like:

public static void tapPercentage(AppiumDriver driver, double x_percentage, double y_percentage) throws Exception {
    Dimension size = driver.manage().window().getSize();

    int xPoint = (int) (size.width * x_percentage);
    int yPoint = (int) (size.height * y_percentage);
    TouchAction touchAction=new TouchAction(driver);
    touchAction.tap(xPoint,yPoint).perform();
}

Thank you @Telmo_Cardoso I will try it and get back

Also i will update the screen shot of the problem i faced, I think i have put a wrong one

Hey it doesn´t work for me i always get a point is not within the bounds of the screen exception,if i tap more than y=600. But the size of the iPhone is 375x667.
At one test there was also an info in the log: “Attempted to get a list of webview context but could not connect to ios-webkit-debug-proxy. If you expect to find webviews, pease ensure that the proxy is running and accessible” which confuses me.

Could you help me what to do?