0

I am new to automation(looking for help), My scenario is - I need to restart the app and have to check the last data inserted should be auto saved

driver.closeApp is not working ( i already tried) And I don't want to use this code in app launch method, I want to make an another method for that

Puneet Jain
  • 11
  • 1
  • 4
  • In your Desired Capabilities "noReset" : "false" then do driver.quit() & launch the app using driver.launch() – Mani Mar 09 '20 at 03:10

1 Answers1

0

1.You can use following method to put you application in background, it will relaunch the application after 10 sec automatically, after relaunch app will make server calls :

 driver.runAppInBackground(Duration.ofSeconds(10));
  1. Reset the currently running app for this session and wait until it is installed again.

    driver.resetApp();

  2. Terminate the app and activate again , pass Package name for Android

    driver.terminateApp('com.apple.Preferences'); driver.activateApp('com.apple.Preferences');

shiv
  • 497
  • 3
  • 17