Android - Appium takes a long time to search for elements

Hi everyone,

I am just new to Appium. Currently, I am working on automation with Appium on both Android and iOS.
I am seeing the issue with Appium on Android: it took long time for Appium to search elements. Even when the element is visible on the page already, it took like 2 minutes for Appium to find and interact with it.
I do not see this problem when running on Appium - iOS.
I used real devices on both iOS and Android. Tried on Android emulator and issue also happened.

Please help me resolve this issue.

Thanks!

1 Like

I still encountered this issue when running on Android.
Here are my desire capibilites:
desired_caps = {
‘platformName’: ‘Android’,
‘platformVersion’: ‘10’,
‘deviceName’: ‘712fe8db’,
‘automationName’: ‘UiAutomator2’,
‘browserName’: ‘Chrome’}

I am running on Mac Appium 1.18.3, Node.js 12.8.1

Thank you.

1 Like

I have similar kind of a problem . The first page of the application after a successful login, has slowness when I call findelement or wait until an expected contiditon happen. I use real device and I’m able to click on the item with phisically on the device, however finding that item programatically (or some other items in same page) takes like a minute. I use webdriver wait which has 10 seconds of timeout but it goes beyond the timeout limit. It is an Android device and I’m using AndroidDriver.

I guess you are with Android UiAutomator. Have similar experience that it stubbon and deadly slow in some screens. Problem in UiAutomator framework.

Sometimes it worked for me to scroll page a bit. When all fails and you have many such screens try switch to Espresso driver. It should eliminate slowness.

I appreciate your answers.
@Aleksei Unfortunately I’m not able to convert the application for Espresso, since I’m working in an automation task other than test.
@mykola-mokhnach Changing the settings worked for me. Now it is much more faster than it was before.