Appium commands are taking long time to locate and click on element - Android React Native App


#1

Hello everyone,

I have recently started automating react native app on Android. The time to select the element and to click it is too high. When I used to automate native apps on Android it was so much faster. Not sure if this is because I am automating now React Native app… On average every command is taking around 10 seconds.

GET /wd/hub/session/327651e9-cd0f-45db-8809-3a30a09a32ae/element/3/location 200 10078 ms - 89
GET /wd/hub/session/327651e9-cd0f-45db-8809-3a30a09a32ae/element/3/size 200 20167 ms - 98
POST /wd/hub/session/327651e9-cd0f-45db-8809-3a30a09a32ae/element/3/click 200 10194 ms - 76

This slowness is also observable from Appium Desktop - Inspector which is running version 1.8.1
Locators strategies: AccessibilityId and XPATH both are slow.

Env:
Appium: 1.8.1
Appium Java Client: 6.1.0
JDK: 1.8


#2

Here’s an interesting blog on automating React Native apps:

Of particular interest:

Note: Your React Native app build should be in production mode. Otherwise, selecting elements on the page will be super crazy slow. You can validate that you’re in the right mode by killing your packager; the production builds should have all the JS assets packaged into the app.

Could this be the problem you face?


#3

Thanks Wreed for your reply however it is not the problem that I am facing. I am testing the app in release mode. And I already made sure that the app has all the JS assets bundled inside.


#4

The same issue i had. my appium automation for React native app is very slow compare other apps automation. did you got any solution for this ? If yes, Please suggest.