Appium ios application automation execution is very slow for XCUI test

While executing automation test cases written in java for iOS application it’s execution takes long time for execution.

Can any one have any idea about how to improve speed of execution?

Appium Desktop client Version : 1.7.1
MAC OS version : 10.12 sierra
iOS version iPhone 6 : 10.3.2

Your elements’ locater strategy may be wrong, read below

Hi @jaimin,

can you please explain more about the issue, in which thing is taking too much time, like: finding elements etc ?

It is working very slow on real device.

I am using accessibility id and xpath to find locator of element.

Check the implicit wait just after you are creating the object of your AppiumDriver or IOSDriver in your project.

like - driver = new IOSDriver(capabilities);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

reduce the time according to your need.

I have already removed implicit wait from my code. So it is taking 0ms to wait.

can you show me your setup code ?

    if (config.getProperty("deviceType").equalsIgnoreCase("Real Device")) {
        capabilitiesIos.setCapability("xcodeConfigFile", TestBaseUtility.getFilePath(config.getProperty("iOSxConfigPath"), config.getProperty("iOSxConfigFileName")).getAbsolutePath());
        capabilitiesIos.setCapability("app", TestBaseUtility.getFilePath(config.getProperty("iOSAppIpaPath"), config.getProperty("iOSAppIpaName")).getAbsolutePath());
        capabilitiesIos.setCapability("udid", config.getProperty("deviceUdId"));

    } else {
        File appDir = new File(config.getProperty("iOSApplicationPath"));
        File app = new File(appDir, config.getProperty("iOSAppName"));
        capabilitiesIos.setCapability("app", app.getAbsolutePath());
    capabilitiesIos.setCapability("platformName", config.getProperty("iOSPlatformName"));
    capabilitiesIos.setCapability("deviceName", config.getProperty("deviceName"));
    capabilitiesIos.setCapability("bundleid", config.getProperty("bundleID"));
    capabilitiesIos.setCapability("automationName", config.getProperty("automationName"));
    //capabilitiesIos.setCapability("clearSystemFiles", true);
    capabilitiesIos.setCapability("realDeviceLogger", config.getProperty("realDeviceLogger"));
    driver = new IOSDriver(new URL(""), capabilitiesIos);

I find my iOS device automation time of execution of each step is 2x slower compare to iOS sim. Has anyone found a work around for this problem? My entire 200+ regression test suite takes about a whopping 16 hours to run!

I have used below wait statement to wait for every element visibility.
for this statement it is taking so much time.

public static void waiForVisibility(String xpath) {
    wait = new WebDriverWait(driver, 30);

you can reduce it by using 10 , instead of 30.

I think, It is the value of overall timeout. So It should not affect the slow execution.

It is taking 10-15 seconds of wait everytime, If element is already visible.

is it due to xpath I have used for wait?

are you using waits where you initializing your driver ?

Hi guys,

I have similar problem. My setup is executing tests on a real device. And execution is extremely slow.
Sometimes it takes around 5s for taping on a button. I am using fluent waits. They are functioning correctly. I tried without them and I didn’t noticed any speeding up in test execution.

For locators i am using @iOSFindBy(accessibility = “SignInGoogle”)

page object are mapped PageFactory.initElements(new AppiumFieldDecorator(driver), this);

java-client is 6.1.0
appium desktop is 1.8.1
ios 10.13.5

I tried everything but only this helped
Just add capability: waitForQuiescence = false

Hi all,

Im also facing same issue, my script is very slow in iOS device and it is taking more time to find out elements.
Just I put 60 sec explicit wait for every element, if I remove wait timeout my script failing, but if run same script in Android devices it is much faster. what can I do make my script faster

Im using WebdriverIO using Javascript
using locators xpath, Accessibility Id and IOS predicts string, is there any another way to find locators