appium_lib_core 9.5.1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65d659dce3980c45c306b4e6e2da0f9e089428b2de1bd881bf8a276f37e66900
4
- data.tar.gz: 6d8e9e621366cef67cbd8e40ddbe8e1a79eb0e191cb5295bdd19e583dfc770fa
3
+ metadata.gz: 12d386d3e8769c8292b096b65b8de708fcecea995775f50e3dbc1a7025b97c42
4
+ data.tar.gz: '096f64ed445ce70b10f49873e627cdcfdbf5431a718615a68089333a18b4ad13'
5
5
  SHA512:
6
- metadata.gz: fbd3f5b0aa25fbb1ca35ef4002a1a49470a329bcab6d0ea12c01679cb3ee8834f41f33b702fa31caaa44e80236b8e6cd2d07c74c3dec54711a1b68a128243475
7
- data.tar.gz: bbab7740cde1fd3995a1c55dcf46ff8452f1db4286b595995c0840a3a81947acc7245b97a1bd2667ca514b5b52466f1fbdb1b4e1ba9d58c00f9eef8d35903615
6
+ metadata.gz: 784554dc3954ff170b3f79c50cda1a23bcaaeaf55a349d4a2a0ecb12db5b6f7c908f4e882de6e9a5b2afd42c9d87a2815c414e16181f680f92b91f3f7bedef18
7
+ data.tar.gz: 9e71aa8a9a7093a607c4d2aa17b72b1f16c5eabe0b5fcc1e8ed34c4c16d18ddc80a411d748c5cbde82d38756eb540c8c355ccb4339c62864733b50e521e43d00
data/CHANGELOG.md CHANGED
@@ -2,13 +2,14 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  Read `release_notes.md` for commit level details.
4
4
 
5
- ## [Unreleased]
5
+ ## [10.0.0] - 2025-02-16
6
6
 
7
7
  ### Enhancements
8
+ - Use `http://127.0.0.1:4723` as the default url destination instead of `http://127.0.0.1:4723/wd/hub`
9
+ - `--base-path` in appium server may need to drop the `/wd/hub`
8
10
 
9
- ### Bug fixes
10
-
11
- ### Deprecations
11
+ ## [9.5.2] - 2025-01-30
12
+ - Fix yardoc
12
13
 
13
14
  ## [9.5.1] - 2025-01-29
14
15
 
data/Gemfile CHANGED
@@ -8,8 +8,8 @@ gem 'minitest', '~> 5.0'
8
8
  gem 'minitest-reporters', '~> 1.1'
9
9
  gem 'parallel_tests'
10
10
  gem 'rake', '~> 13.0'
11
- gem 'rubocop', '1.71.0'
11
+ gem 'rubocop', '1.71.2'
12
12
  gem 'simplecov'
13
13
  gem 'steep', '~> 1.9.3'
14
- gem 'webmock', '~> 3.24.0'
14
+ gem 'webmock', '~> 3.25.0'
15
15
  gem 'yard', '~> 0.9.11'
data/README.md CHANGED
@@ -49,7 +49,7 @@ Run functional tests which require the Appium server and real device, Simulator/
49
49
  $ npm install --location=global appium
50
50
  $ appium driver install xcuitest
51
51
  $ appium driver install uiautomator2 # etc
52
- $ appium --base-path=/wd/hub --relaxed-security # To run all tests in local
52
+ $ appium --relaxed-security # To run all tests in local
53
53
  ```
54
54
 
55
55
  - Conduct tests
@@ -146,7 +146,7 @@ As of version 5.8.0, the client can attach to an existing session. The main purp
146
146
 
147
147
  ```ruby
148
148
  # @driver is the driver instance of an existing session
149
- attached_driver = ::Appium::Core::Driver.attach_to @driver.session_id, url: 'http://127.0.0.1:4723/wd/hub', automation_name: 'XCUITest', platform_name: 'ios'
149
+ attached_driver = ::Appium::Core::Driver.attach_to @driver.session_id, url: 'http://127.0.0.1:4723', automation_name: 'XCUITest', platform_name: 'ios'
150
150
  assert attached_driver.session_id == @driver.session_id
151
151
  attached_driver.page_source
152
152
  ```
@@ -126,16 +126,14 @@ module Appium
126
126
  #
127
127
 
128
128
  # @!method location=
129
- # Set the location of the device.
130
- #
131
- # @param [::Appium::Location] location Set the location.
129
+ # Set the [::Appium::Location] of the device.
132
130
  #
133
131
  # @example
134
132
  #
135
133
  # driver.location = ::Appium::Location.new(10, 10, 10)
136
134
  #
137
135
 
138
- # @!method set_location
136
+ # @!method set_location(latitude, longitude, altitude, speed: nil, satellites: nil)
139
137
  # Set the location of the device.
140
138
  #
141
139
  # @param [String, Number] latitude Set the latitude.
@@ -145,7 +143,6 @@ module Appium
145
143
  # in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
146
144
  # @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
147
145
  # This number is respected on Emulators.
148
- # @param [::Appium::Location]
149
146
  #
150
147
  # @example
151
148
  #
@@ -59,16 +59,16 @@ module Appium
59
59
  # Appium only.
60
60
  # Attach to an existing session.
61
61
  #
62
- # @param [String] The session id to attach to.
62
+ # @param [String] session_id The session id to attach to.
63
63
  # @param [String] platform_name The platform name to keep in the dummy capabilities
64
- # @param [String] platform_name The automation name to keep in the dummy capabilities
64
+ # @param [String] automation_name The automation name to keep in the dummy capabilities
65
65
  # @return [::Appium::Core::Base::Capabilities]
66
66
  #
67
67
  # @example
68
68
  #
69
69
  # new_driver = ::Appium::Core::Driver.attach_to(
70
70
  # driver.session_id,
71
- # url: 'http://127.0.0.1:4723/wd/hub', automation_name: 'UiAutomator2', platform_name: 'Android'
71
+ # url: 'http://127.0.0.1:4723', automation_name: 'UiAutomator2', platform_name: 'Android'
72
72
  # )
73
73
  #
74
74
  def attach_to(session_id, platform_name, automation_name)
@@ -625,14 +625,14 @@ module Appium
625
625
  #
626
626
  # @param [String] path The absolute local path or remote http URL to an .ipa or .apk file,
627
627
  # or a .zip containing one of these.
628
- # @param [Boolean] replace Only for Android. Whether to reinstall/upgrade the package if it is already present
628
+ # @option [Boolean] replace Only for Android. Whether to reinstall/upgrade the package if it is already present
629
629
  # on the device under test. +true+ by default
630
- # @param [Integer] timeout Only for Android. How much time to wait for the installation to complete.
630
+ # @option [Integer] timeout Only for Android. How much time to wait for the installation to complete.
631
631
  # 60000ms by default.
632
- # @param [Boolean] allow_test_packages Only for Android. Whether to allow installation of packages marked as test
632
+ # @option [Boolean] allow_test_packages Only for Android. Whether to allow installation of packages marked as test
633
633
  # in the manifest. +false+ by default
634
- # @param [Boolean] use_sdcard Only for Android. Whether to use the SD card to install the app. +false+ by default
635
- # @param [Boolean] grant_permissions Only for Android. whether to automatically grant application permissions
634
+ # @option [Boolean] use_sdcard Only for Android. Whether to use the SD card to install the app. +false+ by default
635
+ # @option [Boolean] grant_permissions Only for Android. whether to automatically grant application permissions
636
636
  # on Android 6+ after the installation completes. +false+ by default
637
637
  #
638
638
  # Other parameters such as https://github.com/appium/appium-xcuitest-driver#mobile-installapp also can be set.
@@ -1014,7 +1014,7 @@ module Appium
1014
1014
 
1015
1015
  # Convert vanilla element response to ::Appium::Core::Element
1016
1016
  #
1017
- # @param [Hash] id The id which can get as a response from server
1017
+ # @param [Hash] response_id id The id which can get as a response from server
1018
1018
  # @return [::Appium::Core::Element]
1019
1019
  #
1020
1020
  # @example
@@ -56,7 +56,6 @@ module Appium
56
56
  # in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
57
57
  # @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
58
58
  # This number is respected on Emulators.
59
- # @param [::Appium::Location]
60
59
  #
61
60
  # @example
62
61
  #
@@ -46,18 +46,7 @@ module Appium
46
46
  # Can be fully qualified, or simple, and simple defaults to <code>androidx.test.espresso.matcher</code> package
47
47
  # (e.g.: <code>class=CursorMatchers</code> fully qualified is <code>class=androidx.test.espresso.matcher.CursorMatchers</code>
48
48
  #
49
- # See example how to send viewmatcher and datamatcher in Ruby client
50
- #
51
- #
52
- # @overload find_element(how, what)
53
- # @param [Symbol, String] how The method to find the element by
54
- # @param [String] what The locator to use
55
- #
56
- # @overload find_element(opts)
57
- # @param [Hash] opts Find options
58
- # @option opts [Symbol] :how Key named after the method to find the element by, containing the locator
59
- # @return [Element]
60
- # @raise [Error::NoSuchElementError] if the element doesn't exist
49
+ # See test code in the client repository to see how to send viewmatcher and datamatcher in Ruby client
61
50
  #
62
51
  # @example Find element with each keys
63
52
  #
@@ -101,7 +90,6 @@ module Appium
101
90
  # e.tag_name #=> "XCUIElementTypeStaticText"
102
91
  #
103
92
  # rubocop:enable Layout/LineLength
104
-
105
93
  APPIUM_EXTRA_FINDERS = {
106
94
  accessibility_id: 'accessibility id',
107
95
  image: '-image',
@@ -129,7 +129,7 @@ module Appium
129
129
  attr_reader :automation_name
130
130
 
131
131
  # Custom URL for the selenium server. If set this attribute, ruby_lib_core try to handshake to the custom url.<br>
132
- # Defaults to false. Then try to connect to <code>http://127.0.0.1:#{port}/wd/hub</code>.
132
+ # Defaults to false. Then try to connect to <code>http://127.0.0.1:#{port}</code>.
133
133
  # @return [String]
134
134
  attr_reader :custom_url
135
135
 
@@ -196,7 +196,7 @@ module Appium
196
196
  # # format 1
197
197
  # @core = Appium::Core.for caps: {...}, appium_lib: {...}
198
198
  # # format 2. 'capabilities:' is also available instead of 'caps:'.
199
- # @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", capabilities: {...}, appium_lib: {...}
199
+ # @core = Appium::Core.for url: "http://127.0.0.1:8080", capabilities: {...}, appium_lib: {...}
200
200
  #
201
201
  #
202
202
  # require 'rubygems'
@@ -220,7 +220,7 @@ module Appium
220
220
  # }
221
221
  # }
222
222
  # @core = Appium::Core.for(opts) # create a core driver with 'opts' and extend methods into 'self'
223
- # @core.start_driver # Connect to 'http://127.0.0.1:8080/wd/hub' because of 'port: 8080'
223
+ # @core.start_driver # Connect to 'http://127.0.0.1:8080' because of 'port: 8080'
224
224
  #
225
225
  # # Start iOS driver with .zip file over HTTP
226
226
  # # 'capabilities:' is also available instead of 'caps:'. Either is fine.
@@ -233,7 +233,7 @@ module Appium
233
233
  # app: 'http://example.com/path/to/MyiOS.app.zip'
234
234
  # },
235
235
  # appium_lib: {
236
- # server_url: 'http://custom-host:8080/wd/hub.com',
236
+ # server_url: 'http://custom-host:8080/wd/hub',
237
237
  # wait: 0,
238
238
  # wait_timeout: 20,
239
239
  # wait_interval: 0.3,
@@ -241,11 +241,11 @@ module Appium
241
241
  # }
242
242
  # }
243
243
  # @core = Appium::Core.for(opts)
244
- # @core.start_driver # Connect to 'http://custom-host:8080/wd/hub.com'
244
+ # @core.start_driver # Connect to 'http://custom-host:8080/wd/hub'
245
245
  #
246
246
  # # Start iOS driver as another format. 'url' is available like below
247
247
  # opts = {
248
- # url: "http://custom-host:8080/wd/hub.com",
248
+ # url: "http://custom-host:8080/wd/hub",
249
249
  # capabilities: {
250
250
  # platformName: :ios,
251
251
  # platformVersion: '11.0',
@@ -261,7 +261,7 @@ module Appium
261
261
  # }
262
262
  # }
263
263
  # @core = Appium::Core.for(opts) # create a core driver with 'opts' and extend methods into 'self'
264
- # @core.start_driver # start driver with 'url'. Connect to 'http://custom-host:8080/wd/hub.com'
264
+ # @core.start_driver # start driver with 'url'. Connect to 'http://custom-host:8080/wd/hub'
265
265
  #
266
266
  # # With a custom listener
267
267
  # class CustomListener < ::Selenium::WebDriver::Support::AbstractEventListener
@@ -290,7 +290,7 @@ module Appium
290
290
  # an endpoint to get running session's capabilities.
291
291
  #
292
292
  #
293
- # @param [String] The session id to attach to.
293
+ # @param [String] session_id The session id to attach to.
294
294
  # @param [String] url The WebDriver URL to attach to with the session_id.
295
295
  # @param [String] automation_name The platform name to keep in the dummy capabilities
296
296
  # @param [String] platform_name The automation name to keep in the dummy capabilities
@@ -300,7 +300,7 @@ module Appium
300
300
  #
301
301
  # new_driver = ::Appium::Core::Driver.attach_to(
302
302
  # driver.session_id, # The 'driver' has an existing session id
303
- # url: 'http://127.0.0.1:4723/wd/hub', automation_name: 'UiAutomator2', platform_name: 'Android'
303
+ # url: 'http://127.0.0.1:4723', automation_name: 'UiAutomator2', platform_name: 'Android'
304
304
  # )
305
305
  # new_driver.page_source # for example
306
306
  #
@@ -352,7 +352,7 @@ module Appium
352
352
  # Creates a new global driver and quits the old one if it exists.
353
353
  # You can customise http_client as the following
354
354
  #
355
- # @param [String] server_url Custom server url to send to requests. Default is "http://127.0.0.1:4723/wd/hub".
355
+ # @param [String] server_url Custom server url to send to requests. Default is "http://127.0.0.1:4723".
356
356
  # @param http_client_ops [Hash] Options for http client
357
357
  # @option http_client_ops [Hash] :http_client Custom HTTP Client
358
358
  # @option http_client_ops [Hash] :open_timeout Custom open timeout for http client.
@@ -383,10 +383,10 @@ module Appium
383
383
  # }
384
384
  #
385
385
  # @core = Appium::Core.for(opts) # create a core driver with 'opts' and extend methods into 'self'
386
- # @driver = @core.start_driver server_url: "http://127.0.0.1:8000/wd/hub"
386
+ # @driver = @core.start_driver server_url: "http://127.0.0.1:8000"
387
387
  #
388
388
  # # Attach custom HTTP client
389
- # @driver = @core.start_driver server_url: "http://127.0.0.1:8000/wd/hub",
389
+ # @driver = @core.start_driver server_url: "http://127.0.0.1:8000",
390
390
  # http_client_ops: { http_client: Your:Http:Client.new,
391
391
  # open_timeout: 1_000,
392
392
  # read_timeout: 1_000 }
@@ -394,7 +394,7 @@ module Appium
394
394
 
395
395
  def start_driver(server_url: nil,
396
396
  http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
397
- @custom_url ||= "http://127.0.0.1:#{@port}/wd/hub"
397
+ @custom_url ||= "http://127.0.0.1:#{@port}"
398
398
  @custom_url = server_url unless server_url.nil?
399
399
 
400
400
  @http_client = get_http_client http_client: http_client_ops.delete(:http_client),
@@ -23,7 +23,7 @@ module Appium
23
23
  # rubocop:disable Layout/LineLength
24
24
 
25
25
  # @since Appium 1.20.0
26
- # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, fps: nil, preset: nil, video_filter: nil, enable_capture_clicks: nil, enable_cursor_capture: nil, device_id: nil)
26
+ # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, fps: nil, preset: nil, video_filter: nil, enable_capture_clicks: nil, enable_cursor_capture: nil, device_id: nil, time_limit: nil)
27
27
  #
28
28
  # Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11
29
29
  # (ffmpeg utility is required: 'brew install ffmpeg').
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '9.5.1' unless defined? ::Appium::Core::VERSION
18
- DATE = '2025-01-29' unless defined? ::Appium::Core::DATE
17
+ VERSION = '10.0.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2025-02-16' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -27,7 +27,8 @@ module Appium
27
27
  # @param [Hash] hash Hash value to make symbolise
28
28
  #
29
29
  # @example
30
- # opts = Appium.symbolize_keys(opts)
30
+ #
31
+ # opts = Appium.symbolize_keys(opts)
31
32
  #
32
33
  def self.symbolize_keys(hash, nested: false, enable_deprecation_msg: true)
33
34
  # FIXME: As https://github.com/appium/ruby_lib/issues/945, we must remove this implicit string to symbol.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.5.1
4
+ version: 10.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-29 00:00:00.000000000 Z
11
+ date: 2025-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faye-websocket