diff --git a/CHANGELOG.md b/CHANGELOG.md index b2857f5c..dbc2ca3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Read `release_notes.md` for commit level details. ### Deprecations +## [9.3.0] - 2024-12-08 + +### Deprecations +- Remove deprecated `Appium::Core#quit_driver`. Please use `Appium::Core::Driver.quit` instead. + # [9.2.1] - 2024-08-01 ### Bug fixes diff --git a/appium_lib_core.gemspec b/appium_lib_core.gemspec index d0f7b707..283a7224 100644 --- a/appium_lib_core.gemspec +++ b/appium_lib_core.gemspec @@ -29,10 +29,10 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest-reporters', '~> 1.1' spec.add_development_dependency 'parallel_tests' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '1.66.1' + spec.add_development_dependency 'rubocop', '1.69.2' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'steep', '~> 1.7.0' - spec.add_development_dependency 'webmock', '~> 3.23.0' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9.11' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/lib/appium_lib_core/common/base/driver.rb b/lib/appium_lib_core/common/base/driver.rb index 3a3d0501..7f74c517 100644 --- a/lib/appium_lib_core/common/base/driver.rb +++ b/lib/appium_lib_core/common/base/driver.rb @@ -193,9 +193,6 @@ def add_command(method:, url:, name:, &block) raise ::Appium::Core::Error::ArgumentError, "Available method is either #{AVAILABLE_METHODS}" end - # TODO: Remove this logger before Appium 2.0 release - ::Appium::Logger.info '[Experimental] this method is experimental for Appium 2.0. This interface may change.' - @bridge.add_command method: method, url: url, name: name, &block end diff --git a/lib/appium_lib_core/driver.rb b/lib/appium_lib_core/driver.rb index 0df6e8be..54a95bb9 100644 --- a/lib/appium_lib_core/driver.rb +++ b/lib/appium_lib_core/driver.rb @@ -394,7 +394,6 @@ def setup_for_new_session(opts = {}) def start_driver(server_url: nil, http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 }) - @custom_url ||= "http://127.0.0.1:#{@port}/wd/hub" @custom_url = server_url unless server_url.nil? @@ -431,12 +430,6 @@ def start_driver(server_url: nil, @http_client.delete_additional_header Appium::Core::Base::Http::RequestHeaders::KEYS[:idempotency] end - # TODO: this method can be removed after releasing Appium 2.0, and after a while - # since Appium 2.0 reuqires 'automationName'. This method won't help anymore then. - # If "automationName" is set only server side, this method set "automationName" attribute into @automation_name. - # Since @automation_name is set only client side before start_driver is called. - set_automation_name_if_nil - set_implicit_wait_by_default(@default_wait) @driver @@ -446,7 +439,6 @@ def start_driver(server_url: nil, # Attach to an existing session def attach_to(session_id, url: nil, automation_name: nil, platform_name: nil, http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 }) - raise ::Appium::Core::Error::ArgumentError, 'The :url must not be nil' if url.nil? raise ::Appium::Core::Error::ArgumentError, 'The :automation_name must not be nil' if automation_name.nil? raise ::Appium::Core::Error::ArgumentError, 'The :platform_name must not be nil' if platform_name.nil? @@ -500,20 +492,6 @@ def set_implicit_wait_by_default(wait) {} end - # [Deprecated] Quits the driver. This method is the same as @driver.quit - # @return [void] - # - # @example - # - # @core.quit_driver - # - def quit_driver - ::Appium::Logger.warn('[DEPRECATION] quit_driver will be removed. Please use @driver.quit instead.') - @driver.quit - rescue # rubocop:disable Style/RescueStandardError - nil - end - # Returns the server's version info. This method calls +driver.remote_status+ internally # # @return [Hash] @@ -696,16 +674,6 @@ def convert_downcase(value) value.is_a?(Symbol) ? value.downcase : value.downcase.strip.intern end - # @private - def set_automation_name_if_nil - return unless @automation_name.nil? - - automation_name = if @driver.capabilities['automationName'] - @driver.capabilities['automationName'].downcase.strip.intern - end - @automation_name = convert_to_symbol automation_name - end - def get_cap(name) name_with_prefix = "#{::Appium::Core::Base::Bridge::APPIUM_PREFIX}#{name}" @caps[convert_to_symbol name] || diff --git a/lib/appium_lib_core/version.rb b/lib/appium_lib_core/version.rb index 0c09e57a..ef45b0ef 100644 --- a/lib/appium_lib_core/version.rb +++ b/lib/appium_lib_core/version.rb @@ -14,7 +14,7 @@ module Appium module Core - VERSION = '9.2.1' unless defined? ::Appium::Core::VERSION - DATE = '2024-08-01' unless defined? ::Appium::Core::DATE + VERSION = '9.3.0' unless defined? ::Appium::Core::VERSION + DATE = '2024-12-08' unless defined? ::Appium::Core::DATE end end diff --git a/release_notes.md b/release_notes.md index 0ccac23e..51eb7ab6 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,3 +1,20 @@ +#### v9.3.0 2024-12-08 + +- [ca1fc7d](https://github.com/appium/ruby_lib_core/commit/ca1fc7d85bc02e877d3d6ebc54e65b3813091edf) Release 9.3.0 +- [0850725](https://github.com/appium/ruby_lib_core/commit/085072581c002566c476fe5b2d5c1091478ac86b) remove a deprecation method +- [210ea05](https://github.com/appium/ruby_lib_core/commit/210ea0547ea6b5d645a0b02f7a7c6496734a1ff0) feat!: remove deprecated quit_driver (#579) +- [3c7a96a](https://github.com/appium/ruby_lib_core/commit/3c7a96a01010f0206bb694f1192d4174b7bc21b3) chore: remove some leftover todos (#580) +- [0bd0bf4](https://github.com/appium/ruby_lib_core/commit/0bd0bf49e0e2965586f1f3b462bd816b8e45da20) chore(deps-dev): update rubocop requirement from = 1.69.0 to = 1.69.1 (#578) +- [3166df8](https://github.com/appium/ruby_lib_core/commit/3166df84bf8ed6ccf151766f0ad004a767674804) chore(deps-dev): update rubocop requirement from = 1.68.0 to = 1.69.0 (#577) +- [3c85ff0](https://github.com/appium/ruby_lib_core/commit/3c85ff03b4039aadebf0ff86de2622303a574d63) chore(deps-dev): update rubocop requirement from = 1.67.0 to = 1.68.0 (#576) +- [7022542](https://github.com/appium/ruby_lib_core/commit/702254289cd32b6d5df62776568b7a6ad7d368dd) chore(deps-dev): update rubocop requirement from = 1.66.1 to = 1.67.0 (#575) +- [27a0ca0](https://github.com/appium/ruby_lib_core/commit/27a0ca0414b5f9c26ca871ad2aa55d4ad9f3022d) chore(deps-dev): update webmock requirement from ~> 3.23.0 to ~> 3.24.0 (#574) +- [960afdf](https://github.com/appium/ruby_lib_core/commit/960afdfc718a8b97a40dc41aed9b8335e344ea5d) chore(deps-dev): update rubocop requirement from = 1.66.0 to = 1.66.1 (#573) +- [b0670e2](https://github.com/appium/ruby_lib_core/commit/b0670e2a360905d5e1c364ff7a7856136871da3a) chore(deps-dev): update rubocop requirement from = 1.65.1 to = 1.66.0 (#572) +- [038ec4e](https://github.com/appium/ruby_lib_core/commit/038ec4e1a8119f60ed8f292d219c1d6d2b4b9a85) test: add webSocketUrl in test +- [cae1716](https://github.com/appium/ruby_lib_core/commit/cae1716c0b78191512021f2025bad058b61cc9f3) chore: refer to the prefix + + #### v9.2.1 2024-08-01 - [41e58e5](https://github.com/appium/ruby_lib_core/commit/41e58e53641f6f72ea987b5dc6ff6efc0db7bcd7) Release 9.2.1 diff --git a/sig/lib/appium_lib_core/driver.rbs b/sig/lib/appium_lib_core/driver.rbs index 7222fb96..803816bb 100644 --- a/sig/lib/appium_lib_core/driver.rbs +++ b/sig/lib/appium_lib_core/driver.rbs @@ -160,8 +160,6 @@ module Appium def set_implicit_wait_by_default: (untyped wait) -> untyped - def quit_driver: () -> void - def appium_server_version: () -> Hash[String, String] private @@ -193,8 +191,6 @@ module Appium def set_automation_name: () -> Symbol? def convert_downcase: (Symbol value) -> Symbol - - def set_automation_name_if_nil: () -> Symbol? end end end diff --git a/test/functional/android/driver_test.rb b/test/functional/android/driver_test.rb index cf246669..33cbcd17 100644 --- a/test/functional/android/driver_test.rb +++ b/test/functional/android/driver_test.rb @@ -85,8 +85,6 @@ def test_mobile_perform_action new_element = @driver.find_element :xpath, '//*[@focused="true"]' assert_equal 'Right is always right', new_element.text end - - # TODO: call @driver.quit after tests end end # rubocop:enable Style/ClassVars diff --git a/test/functional/ios/driver_test.rb b/test/functional/ios/driver_test.rb index 8e8efb88..42f015ba 100644 --- a/test/functional/ios/driver_test.rb +++ b/test/functional/ios/driver_test.rb @@ -178,8 +178,6 @@ def test_batch_combination_ruby_script assert_equal(rect.width, r.result[1]['width']) assert_equal(rect.height, r.result[1]['height']) end - - # TODO: call @driver.quit after tests end end # rubocop:enable Style/ClassVars