Search code examples
appiumappium-android

handling chrome browser, play store and native app together - Android Appium


Here is my scenario:

  1. Launch the native app and go to sign in page of my hybrid native app
  2. Launch chrome browser in my mobile and navigate to particular url. From there navigate to playstore.
  3. Now make sure after clicking the open button from the playstore launches my app(from step 1) successfully.

To achieve this i have did this.

  1. Create an appium driver instance for my native app and launch it. --> Success
  2. Create an another driver instance for chrome browser, navigate, click the link and it will take to the app page in the playstore. --> Success
  3. Now i need to click Open button in the playstore and check when my app has been pushed to view. --> NOT SURE HOW TO DO THIS

I am having my control only on chrome browser and my app. How i can make this happen and your help is appreciated.


Solution

  • Just use the driver that you have for your apk app. By default it has the track of the current focused app of your mobile (in view).

    For example, if you are in your app, and now you changed to settings app or some other app, if you get the driver.getPageSource()it will give the page source of the current view automatically. Basically you have control over the current view (android apk ) through the appium.