How to improve execution time

Hi guys,

this is my current system:

  • KS version: 8.1.0
  • Appium version: 1.18.0
  • Device: Emulator (Android Studio AVD)

when I run a test suite, there is some action that takes a long time to finish, and not honoring the time out that I set for that action, below example is set text operation.

I can improve the time using sendKeys, but it still can take up to a minute.

also, the findTestObject method is not taking much time, it seems like it can directly get the object, only the execution that seems too slow.

I have been changing the object locator by using xpath, attributes (className and resource-id), but there is no significant improvement. The fastest one is using attributes, and sendKeys keyword like my first image.

I also have been upgrading to KS version 8.2.0 and appium version 1.21.0, but still doesn’t help.

do you guys have any idea for what causing it? is there anything I can do to improve the execution time?

I really appreciate your answers.

I want to add some details, in case this will help. After some debugging, I found out that the cause is a ConstraintLayout is being bind to AppBarLayout using app:layout_behavior=“com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior”.

If I remove the bindings, it will resulted to the toolbar being missing, and also the layout hierarchy being a little bit flattened. Below is the hierarchy difference:

With binding

Without binding

Is there any possibilities to improve the execution time with the original hierarchy?
any help will be truly appreciated.