From cf3aa4dc90dad40dd6952c0ee47c6164038b01c0 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 6 Aug 2024 01:55:32 -0700 Subject: [PATCH 1/3] fix: skip absolute_app_path for non-app --- lib/appium_lib/driver.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/appium_lib/driver.rb b/lib/appium_lib/driver.rb index 63b5b722..2a758089 100644 --- a/lib/appium_lib/driver.rb +++ b/lib/appium_lib/driver.rb @@ -272,6 +272,9 @@ def set_app_path(opts) return if !app_path.nil? && File.exist?(app_path) # The app file is not exact path + app_path = get_cap(@core.caps, 'app') + return if app_path.nil? + @core.caps['app'] = self.class.absolute_app_path opts end From bc2842bc5773c10e2c1a928d4f4ffef9647c206e Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 6 Aug 2024 01:56:13 -0700 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06440f12..77ea8c85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Commit based release not is [release_notes.md](./release_notes.md) Release tags are https://github.com/appium/ruby_lib/releases . +## not released +- Fix non `app` capability behavior + ## 15.2.1 - 2024-08-03 - Fix client side timeout in the default http client - Bump appium_lib_core 9.2.1+ to apply the fix From 820e0af33a9cd1168861700e659e20bff14d0e71 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 6 Aug 2024 01:57:58 -0700 Subject: [PATCH 3/3] tweak the order --- lib/appium_lib/driver.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/appium_lib/driver.rb b/lib/appium_lib/driver.rb index 2a758089..41892848 100644 --- a/lib/appium_lib/driver.rb +++ b/lib/appium_lib/driver.rb @@ -269,11 +269,8 @@ def set_app_path(opts) # return the path exists on the local app_path = Driver.get_cap(@core.caps, 'app') - return if !app_path.nil? && File.exist?(app_path) - - # The app file is not exact path - app_path = get_cap(@core.caps, 'app') return if app_path.nil? + return if File.exist?(app_path) @core.caps['app'] = self.class.absolute_app_path opts end