0

I am doing an automation of an android mobile app, there is a scenario where I am trying to use deeplink of where that deeplink should open the app in device and download some assets. As a process I am first opening my app and then I just login to the app then I am just doing driver.quit(); then I am opening the chrome app using appium and doing sendkeys() in url bar of chrome but this just opening the app as logged in but I din't find the assets downloaded. If the same thing I do manually I can see the assets are downloaded in the app.

ExampleCode:

chromeSearch2.sendKeys("myproduct.page.link/3CCjN8sdwPZAuhaf9");
TouchAction a2 = new TouchAction(driver);
a2.tap (350, 230).perform();

Also some can suggest different approach for this.

Deepak N
  • 1,408
  • 3
  • 15
  • 37

1 Answers1

0

I got the answer after a lot of research. Instead of the driver.quit() and then starting chrome with new driver I just changed the same driver from my app to chrome as

driver.startActivity("com.android.chrome", "com.google.android.apps.chrome.Main");

After doing this if I pass the deep link I am able to get the assets.

This I got in this one of the stackoverflow answer.

Deepak N
  • 1,408
  • 3
  • 15
  • 37