diff --git a/features/steps/ios_steps.rb b/features/steps/ios_steps.rb index 8ae8f4a1b..a220c0090 100644 --- a/features/steps/ios_steps.rb +++ b/features/steps/ios_steps.rb @@ -69,7 +69,12 @@ def click_if_present(element) system("killall #{app} > /dev/null && sleep 1") Maze.driver.get(app) else - Maze.driver.launch_app + begin + Maze.driver.launch_app + rescue + # Retry because launch_app can fail when performed immediately after an app has stopped running. + Maze.driver.launch_app + end end end