From 34780baa63ef87fcf90e8fd8b54157b76a526484 Mon Sep 17 00:00:00 2001 From: Edgars Eglitis Date: Tue, 9 Jul 2024 15:22:40 +0300 Subject: [PATCH] fix: update syntax for close_app --- lib/core/device.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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