Automate the UAT flow from web to playstore to app

Hi ,

I am keen to know about the feasibility of a scenario and understand how to achieve it . Kindly help with suggestion as am novice in automation .

Scenario is : Can we automate "Navigation and functionality from chrome to ad / banner to playstore to app to test using appium " i.e.

Steps :

1.Launch the application in mobile web browser .

2.When i am using the application in mobile web (xyz page) – user is given an ad to continue in app

3.when user clicks on it – if the user doesn’t have the app already – then user is taken to playstore and once the app is installed then user is taken to the same page in mobile web but in mobile app view .

  1. but if the user does have the app already he is taken to the same page (xyz page) in mobile app .

I started with appium 1st step – with chrome driver object but when i click the ad in step 2 – am taken to web play-store instead of app play-store in step 3 .

My agenda is to perform uat testing for the step 1-4 kindly help

Thanks in advance