diff --git a/lib/core/device.rb b/lib/core/device.rb index 2fa81996..19d8503a 100644 --- a/lib/core/device.rb +++ b/lib/core/device.rb @@ -243,8 +243,8 @@ def navigate(action) end # closes the currently opened app and puts it in the background - def close_app(action = nil) - @driver.background_app(-1) + def close_app(_action) + @driver.execute_script('mobile: backgroundApp', {'seconds': -1}) end # launches the app specified by the Android app package / iOS bundle ID