From 2f6f51751219be7d687ff6cc0e66a0ce492923b1 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 7 Jan 2025 22:36:39 +0000 Subject: [PATCH 1/3] feat: use /se/log and /se/log/types for logs --- lib/appium_lib_core/common/command.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/appium_lib_core/common/command.rb b/lib/appium_lib_core/common/command.rb index 4e1b919a..38c4c8d2 100644 --- a/lib/appium_lib_core/common/command.rb +++ b/lib/appium_lib_core/common/command.rb @@ -171,9 +171,9 @@ module Commands ime_deactivate: [:post, 'session/:session_id/ime/deactivate'], ime_activate_engine: [:post, 'session/:session_id/ime/activate'], - ### Logs - get_available_log_types: [:get, 'session/:session_id/log/types'], - get_log: [:post, 'session/:session_id/log'], + ### Logs based on w3c selenium clients + get_available_log_types: [:get, 'session/:session_id/se/log/types'], + get_log: [:post, 'session/:session_id/se/log'], ### # Appium own From 31583af7821c03705bdb3e566e6d746356ba9245 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 7 Jan 2025 23:59:24 -0800 Subject: [PATCH 2/3] fix warnings --- lib/appium_lib_core/driver.rb | 2 +- test/unit/driver_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/appium_lib_core/driver.rb b/lib/appium_lib_core/driver.rb index 54a95bb9..68282940 100644 --- a/lib/appium_lib_core/driver.rb +++ b/lib/appium_lib_core/driver.rb @@ -622,7 +622,7 @@ def get_app def set_app_path # FIXME: maybe `:app` should check `app` as well. return unless @caps && get_app && !get_app.empty? - return if get_app =~ URI::DEFAULT_PARSER.make_regexp + return if get_app =~ URI::RFC2396_PARSER.make_regexp app_path = File.expand_path(get_app) @caps['app'] = if File.exist? app_path diff --git a/test/unit/driver_test.rb b/test/unit/driver_test.rb index 9bfae767..5fe0fbf6 100644 --- a/test/unit/driver_test.rb +++ b/test/unit/driver_test.rb @@ -49,7 +49,7 @@ def test_with_caps_and_appium_lib opts = { 'caps' => { 'automationName': 'xcuitest' }, appium_lib: {} } driver = ExampleDriver.new(opts) refute_nil driver - assert_equal driver.core.caps[:automationName], nil + assert_nil driver.core.caps[:automationName] end def test_verify_appium_core_base_capabilities_create_capabilities From 7cd626eaf5e3f2ed2695b3145010116898aa9581 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Wed, 8 Jan 2025 00:09:57 -0800 Subject: [PATCH 3/3] fix test --- lib/appium_lib_core/driver.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/appium_lib_core/driver.rb b/lib/appium_lib_core/driver.rb index 68282940..59b73ee2 100644 --- a/lib/appium_lib_core/driver.rb +++ b/lib/appium_lib_core/driver.rb @@ -622,7 +622,9 @@ def get_app def set_app_path # FIXME: maybe `:app` should check `app` as well. return unless @caps && get_app && !get_app.empty? - return if get_app =~ URI::RFC2396_PARSER.make_regexp + + uri_regex = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER + return if get_app =~ uri_regex.make_regexp app_path = File.expand_path(get_app) @caps['app'] = if File.exist? app_path