Wait For Running TestCases Until appium installs Apk on my devices

Hey everyone i am using appium for automating my application. But appium server takes time for installing apps in my devices, so while installing testcases start executing on devices. I want to execute them only when installation is complete and application is ready. Thank you :slight_smile:

@dinesh_kumar i guess you need some driver caps management correction and test. we use logic with our tests for Android:

  1. first test with FULL_RESET driver caps to reinstall app for new version (driver start time depends on apk size. with our 50Mb about 50sec)
  2. min possible tests with FAST_RESET option. tests need client to be resetted and just fresh install. (driver start time in our case about 20sec)
  3. most of tests with NO_RESET option. just start client as is. (driver start time about 15sec)

in code see Different capabilities for different scenarios

@Aleksei Thank you. It means i have to wait like

wait.until(ExpectedCondition) for the first screen to display. Then it will not go for the sequence of test cases?

@dinesh_kumar in your driver caps you metion some activity wait for on start. so in most cases this is automatically waiting for activity to appear. then depending of functionality of your app you possible need some elements in activity to appear. an you can do this in number of ways including mentioned by you.

@Aleksei how can we hold Appium till an activity appears?

@dinesh_kumar as usual (this is only ON start app):

capabilities.setCapability(AndroidMobileCapabilityType.APP_WAIT_ACTIVITY, "your_activity_name");