[Android] Hybrid application with multiple activities


I need to automate a hybrid application, that is composed of multiple applications. All the required apks have to be installed, and then the MAIN APK is started, from which the other apps can be accessed (diff activities, diff package names).

I need to start by launching the main app (HUB) from which the other apps are accessed. Everything works fine until I reach one of the (ANY) inner apps, which has a webview. Whenever I try to switch to that webview I get the following error:

error: Chromedriver create session did not work. Status was 200 and body was {"sessionId":"d2f1746561856a4f682e5e6149c61829","status":100,"value":{"message":"chrome not reachable\n  (Driver info: chromedriver=2.13.307650 (feffe1dd547ee7b5c16d38784cd0cd679dfd7850),platform=Mac OS X 10.9.4 x86_64)"}}

info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver)","origValue":"Did not get session redirect from Chromedriver"},"sessionId":"6a8f2d4d-deb9-45e5-baea-b39bf87b8e69"}

info: <-- POST /wd/hub/session/6a8f2d4d-deb9-45e5-baea-b39bf87b8e69/context 500 60886.307 ms - 280

I have tried all the solutions from this forum and from the web (update chromedriver, root tablet, chmod 777 /data/local, appWaitActivity, appWaitPackage) and nothing works. The only problem I see is that when I reach the inner app, the package and activity have changed, and the driver sends the old ones (the ones used for creation of driver) to the chromedriver.

Is there any info on apium on how to handle the automation of such an app?


It was indeed the diff package name and activity name that was causing this.

Is there ANY possible way to modifiy the capabilities during execution? :slight_smile: For example change the package info or activity info that appium sends to chromedriver?