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 diff --git a/lib/appium_lib_core/driver.rb b/lib/appium_lib_core/driver.rb index 54a95bb9..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::DEFAULT_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 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