appium_lib_core 5.0.0.rc6 → 5.0.1

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: c4ee843cbe6c1b2cb6d84fcc40000c017d8334ba542012b304d21d66ffa9295a
4
- data.tar.gz: c13938466767e24d8d9687d070e63510e73c52fb2d8640d9475e8a4b6ef68c89
3
+ metadata.gz: 6d7090e2267f551b98bc21215bfc636753ebd0ab2fccc2e95bba5e2ea7781659
4
+ data.tar.gz: 719c1d37595a5501c2935de660971458c02314c1c5ca15f9b0b2615bae5f188f
5
5
  SHA512:
6
- metadata.gz: a7d82afb3e81636c6759515dd3126ce44308bf61e419bb88860daf62574252ad66ef07d04b4d75a47044e162113436caabccef332d01abbd08fd0d3459b38985
7
- data.tar.gz: 8940887d4f189c002dff3d68bd895059a4a085d94f69a582a0998e2a2be7e2a7c6d5ae7575ae71303b836413f3a3638bf8306a07071b5b2e7ed48a7da52b878a
6
+ metadata.gz: be218fca9b0d444cabeb4577ddcec877ea180106b61704b10be452ca6ffbfd2bdf56e8ccdf3185a5a23d6aa5cc7a63d383cf4d48c86c446ec9ad72ef9d225526
7
+ data.tar.gz: fe8efa1222a796c36134231e9a04a94a8e3bf195c7dd42824d34f5aa94f3b2816ed8eafbd611e8b19c34df85193d5a98540714043aae946382ed985e2107ff73
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '39 12 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
data/CHANGELOG.md CHANGED
@@ -10,23 +10,49 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
- ## [5.0.0]
13
+ ## [5.0.1] - 2021-11-23
14
14
 
15
15
  ### Enhancements
16
+ - Relaxed version restriction of selenium-webdriver
16
17
 
17
- - Update base selenium webdriver version to `4.0.0`
18
- - Support only W3C spec as following Selenium v4 client
18
+ ## [5.0.0] - 2021-11-05
19
+
20
+ ### Enhancements
21
+
22
+ - Update base selenium webdriver version to `v4`
23
+ - Base Selenium Ruby binding is now v4
24
+ - Support only W3C WebDriver spec (and a few Appium specific commands)
19
25
  - Support Ruby 2.6+
20
- - `element.id` returns the element id instead of `element.ref`. `element.ref` now returns an array.
21
- - Removed `desired_capabilities` as capabilities for `Appium::Core#for`. Please use `capabilities` key name instead
22
- - Removals that already had _duplication_ mark
26
+ - Add `driver#wait`, `driver#wait_until`, `driver#wait_true`, `driver#wait_until_true` syntaxes
27
+ - Can give `driver` instance as its block variable
28
+ - `element.id` returns the element id instead of `element.ref`.
29
+ - `element.ref` now returns an array.
30
+ - Removed `desired_capabilities` as capabilities for `Appium::Core#for`. Please use `capabilities` key name instead.
31
+ - e.g. `Appium::Core.for capabilities: {...}` instead of `Appium::Core.for desired_capabilities: {...}`
32
+ - Removed methods that had _Deprecated_ mark
23
33
  - Removed `driver#screenshot`. Please use `driver#save_screenshot` instead
24
34
  - Removed `driver#send_keys` to send keys to an active element. Please use `driver.action.send_keys('happy testing').perform` instead
25
35
  - Removed `forceMjsonwp` to send only MJSONWP capabilities since Selenium cleint v4 no longer supports MJSONWP
26
- - No longer set default `timeouts` as `0`. ruby_lib_core calls `/timeouts` endpoint only when `appium_lib: { wait: 5 }` is provided explicitly
36
+ - No longer set default `timeouts` as `0`
37
+ - ruby_lib_core calls `/timeouts` endpoint only when `appium_lib: { wait: 5 }` is provided explicitly
27
38
  - Raises `::Appium::Core::Error::ArgumentError` instead of `ArgumentError` for this library specific argument errors
28
- - Add `driver#wait`, `driver#wait_until`, `driver#wait_true`, `driver#wait_until_true` syntaxes
29
- - Can give `driver` instance as its block variable
39
+ - Removed Selendroid related methods
40
+
41
+ ### Deprecations
42
+ - `Appium::Core::TouchAction` and `Appium::Core::MultiTouch` are deprecated
43
+ - Please use W3C actions instead http://appium.io/docs/en/commands/interactions/actions/
44
+ - More working examples:
45
+ - [test/functional/android/webdriver/w3c_actions_test.rb](test/functional/android/webdriver/w3c_actions_test.rb)
46
+ - [test/functional/ios/webdriver/w3c_actions_test.rb](test/functional/ios/webdriver/w3c_actions_test.rb)
47
+ - [test/functional/common_w3c_actions.rb](test/functional/common_w3c_actions.rb)
48
+ - https://www.selenium.dev/documentation/support_packages/mouse_and_keyboard_actions_in_detail/
49
+ - https://www.youtube.com/watch?v=oAJ7jwMNFVU
50
+ - https://appiumpro.com/editions/30-ios-specific-touch-action-methods
51
+ - https://appiumpro.com/editions/29-automating-complex-gestures-with-the-w3c-actions-api
52
+ - `launch_app`, `close_app` and `reset`. Please read [issues#15807](https://github.com/appium/appium/issues/15807) for more details.
53
+ - `activate_app` or a new session request can be alternatives of `launch_app`
54
+ - `terminate_app` or close the session request can be alternatives of `close_app`
55
+ - Close current session and creating a new session, or `terminate_app` and `launch_app` can be alternatives of `reset`
30
56
 
31
57
  ## [4.7.1] - 2021-09-26
32
58
 
data/README.md CHANGED
@@ -13,6 +13,10 @@ This library wraps [selenium-webdriver](https://github.com/SeleniumHQ/selenium/w
13
13
  - http://www.rubydoc.info/github/appium/ruby_lib_core
14
14
  - You can find working API examples in test code, [test/functional](test/functional)
15
15
 
16
+ # Migration from v4 to v5
17
+
18
+ Please read [`[5.0.0]`](CHANGELOG.md#500---2021-11-05) section in [CHANGELOG](CHANGELOG.md)
19
+
16
20
  # Related library
17
21
  - https://github.com/appium/ruby_lib
18
22
 
@@ -22,19 +22,16 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_runtime_dependency 'selenium-webdriver', '~> 4.0.0'
25
+ spec.add_runtime_dependency 'selenium-webdriver', '~> 4.0'
26
26
  spec.add_runtime_dependency 'faye-websocket', '~> 0.11.0'
27
27
 
28
- spec.add_development_dependency 'bundler', '>= 1.14'
29
28
  spec.add_development_dependency 'rake', '~> 13.0'
30
29
  spec.add_development_dependency 'yard', '~> 0.9.11'
31
30
  spec.add_development_dependency 'minitest', '~> 5.0'
32
31
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
33
32
  spec.add_development_dependency 'webmock', '~> 3.14.0'
34
- spec.add_development_dependency 'rubocop', '1.22.2'
33
+ spec.add_development_dependency 'rubocop', '1.23.0'
35
34
  spec.add_development_dependency 'appium_thor', '~> 1.0'
36
- spec.add_development_dependency 'pry'
37
- spec.add_development_dependency 'pry-byebug'
38
35
  spec.add_development_dependency 'parallel_tests'
39
36
  spec.add_development_dependency 'simplecov'
40
37
  end
data/bin/console CHANGED
@@ -6,9 +6,5 @@ require "appium_lib_core"
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
8
8
 
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
9
  require "irb"
14
10
  IRB.start(__FILE__)
@@ -48,6 +48,14 @@ module Appium
48
48
  attr_reader :bridge
49
49
 
50
50
  def initialize(bridge: nil, listener: nil, **opts)
51
+ # For ::Appium::Core::Waitable
52
+ @wait_timeout = opts.delete(:wait_timeout)
53
+ @wait_interval = opts.delete(:wait_interval)
54
+
55
+ # For logging.
56
+ # TODO: Remove when appium core no longer uses this in this bridge.
57
+ @automation_name = opts.delete(:automation_name)
58
+
51
59
  super
52
60
  end
53
61
 
@@ -410,17 +418,9 @@ module Appium
410
418
  alias set_context context=
411
419
 
412
420
  # Place a file in a specific location on the device.
413
- # On iOS, the server should have ifuse libraries installed and configured properly for this feature to work on
414
- # real devices.
415
421
  # On Android, the application under test should be built with debuggable flag enabled in order to get access to
416
422
  # its container on the internal file system.
417
423
  #
418
- # {https://github.com/libimobiledevice/ifuse iFuse GitHub page6}
419
- #
420
- # {https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ}
421
- #
422
- # {https://developer.android.com/studio/debug 'Debug Your App' developer article}
423
- #
424
424
  # @param [String] path Either an absolute path OR, for iOS devices, a path relative to the app, as described.
425
425
  # If the path starts with application id prefix, then the file will be pushed to the root of
426
426
  # the corresponding application container.
@@ -437,18 +437,10 @@ module Appium
437
437
  @bridge.push_file(path, filedata)
438
438
  end
439
439
 
440
- # Pull a file from the simulator/device.
441
- # On iOS the server should have ifuse
442
- # libraries installed and configured properly for this feature to work on real devices.
440
+ # Pull a file from the remote device.
443
441
  # On Android the application under test should be built with debuggable flag enabled in order to get access
444
442
  # to its container on the internal file system.
445
443
  #
446
- # {https://github.com/libimobiledevice/ifuse iFuse GitHub page6}
447
- #
448
- # {https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ}
449
- #
450
- # {https://developer.android.com/studio/debug 'Debug Your App' developer article}
451
- #
452
444
  # @param [String] path Either an absolute path OR, for iOS devices, a path relative to the app, as described.
453
445
  # If the path starts with application id prefix, then the file will be pulled from the root
454
446
  # of the corresponding application container.
@@ -457,7 +449,6 @@ module Appium
457
449
  # Only pulling files from application containers is supported for iOS Simulator.
458
450
  # Provide the remote path in format
459
451
  # <code>@bundle.identifier:container_type/relative_path_in_container</code>
460
- # (Make sure this in ifuse doc)
461
452
  #
462
453
  # @return [Base64-decoded] Base64 decoded data
463
454
  #
@@ -474,18 +465,10 @@ module Appium
474
465
  @bridge.pull_file(path)
475
466
  end
476
467
 
477
- # Pull a folder content from the simulator/device.
478
- # On iOS the server should have ifuse libraries installed and configured properly for this feature to work
479
- # on real devices.
468
+ # Pull a folder content from the remote device.
480
469
  # On Android the application under test should be built with debuggable flag enabled in order to get access to
481
470
  # its container on the internal file system.
482
471
  #
483
- # {https://github.com/libimobiledevice/ifuse iFuse GitHub page6}
484
- #
485
- # {https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ}
486
- #
487
- # {https://developer.android.com/studio/debug 'Debug Your App' developer article}
488
- #
489
472
  # @param [String] path Absolute path to the folder.
490
473
  # If the path starts with <em>@applicationId/</em> prefix, then the folder will be pulled
491
474
  # from the root of the corresponding application container.
@@ -494,7 +477,6 @@ module Appium
494
477
  # Only pulling files from application containers is supported for iOS Simulator.
495
478
  # Provide the remote path in format
496
479
  # <code>@bundle.identifier:container_type/relative_path_in_container</code>
497
- # (Make sure this in ifuse doc)
498
480
  #
499
481
  # @return [Base64-decoded] Base64 decoded data which is zip archived
500
482
  #
@@ -508,19 +490,6 @@ module Appium
508
490
  @bridge.pull_folder(path)
509
491
  end
510
492
 
511
- # Send keyevent on the device.(Only for Selendroid)
512
- # http://developer.android.com/reference/android/view/KeyEvent.html
513
- # @param [integer] key The key to press.
514
- # @param [String] metastate The state the metakeys should be in when pressing the key.
515
- #
516
- # @example
517
- #
518
- # @driver.keyevent 82
519
- #
520
- def keyevent(key, metastate = nil)
521
- @bridge.keyevent(key, metastate)
522
- end
523
-
524
493
  # Press keycode on the device.
525
494
  # http://developer.android.com/reference/android/view/KeyEvent.html
526
495
  # @param [Integer] key The key to press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
@@ -565,6 +534,7 @@ module Appium
565
534
  @bridge.long_press_keycode(key, metastate: metastate, flags: flags)
566
535
  end
567
536
 
537
+ # @deprecated Except for Windows
568
538
  # Start the simulator and application configured with desired capabilities
569
539
  #
570
540
  # @example
@@ -572,9 +542,16 @@ module Appium
572
542
  # @driver.launch_app
573
543
  #
574
544
  def launch_app
545
+ # TODO: Define only in Windows module when ruby_lib_core removes this method
546
+ if @automation_name != :windows
547
+ ::Appium::Logger.warn(
548
+ '[DEPRECATION] launch_app is deprecated. Please use activate_app instead.'
549
+ )
550
+ end
575
551
  @bridge.launch_app
576
552
  end
577
553
 
554
+ # @deprecated Except for Windows
578
555
  # Close an app on device
579
556
  #
580
557
  # @example
@@ -582,9 +559,16 @@ module Appium
582
559
  # @driver.close_app
583
560
  #
584
561
  def close_app
562
+ # TODO: Define only in Windows module when ruby_lib_core removes this method
563
+ if @automation_name != :windows
564
+ ::Appium::Logger.warn(
565
+ '[DEPRECATION] close_app is deprecated. Please use terminate_app instead.'
566
+ )
567
+ end
585
568
  @bridge.close_app
586
569
  end
587
570
 
571
+ # @deprecated
588
572
  # Reset the device, relaunching the application.
589
573
  #
590
574
  # @example
@@ -592,6 +576,10 @@ module Appium
592
576
  # @driver.reset
593
577
  #
594
578
  def reset
579
+ ::Appium::Logger.warn(
580
+ '[DEPRECATION] reset is deprecated. Please use terminate_app and activate_app, ' \
581
+ 'or quit and create a new session instead.'
582
+ )
595
583
  @bridge.reset
596
584
  end
597
585
 
@@ -809,7 +797,7 @@ module Appium
809
797
  #
810
798
  # @example: Zoom
811
799
  #
812
- # f1 = @driver.action.add_pointer_input(:touch, 'finger1')
800
+ # f1 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger1')
813
801
  # f1.create_pointer_move(duration: 1, x: 200, y: 500,
814
802
  # origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
815
803
  # f1.create_pointer_down(:left)
@@ -817,7 +805,7 @@ module Appium
817
805
  # origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
818
806
  # f1.create_pointer_up(:left)
819
807
  #
820
- # f2 = @driver.action.add_pointer_input(:touch, 'finger2')
808
+ # f2 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger2')
821
809
  # f2.create_pointer_move(duration: 1, x: 200, y: 500,
822
810
  # origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
823
811
  # f2.create_pointer_down(:left)
@@ -830,6 +818,10 @@ module Appium
830
818
  def perform_actions(data)
831
819
  raise ::Appium::Core::Error::ArgumentError, "'#{data}' must be Array" unless data.is_a? Array
832
820
 
821
+ # NOTE: 'add_input' in Selenium Ruby implementation has additional 'pause'.
822
+ # This implementation is to avoid the additional pause.
823
+ # https://github.com/SeleniumHQ/selenium/blob/64447d4b03f6986337d1ca8d8b6476653570bcc1/rb/lib/selenium/webdriver/common/action_builder.rb#L207
824
+
833
825
  @bridge.send_actions data.map(&:encode).compact
834
826
  data.each(&:clear_actions)
835
827
  nil
@@ -32,6 +32,7 @@ module Appium
32
32
  predicate: '-ios predicate string',
33
33
  class_chain: '-ios class chain',
34
34
  # Windows with windows prefix
35
+ # @deprecated
35
36
  windows_uiautomation: '-windows uiautomation',
36
37
  # Tizen with Tizen prefix
37
38
  tizen_uiautomation: '-tizen uiautomation'
@@ -122,6 +123,7 @@ module Appium
122
123
  # e.tag_name #=> "XCUIElementTypeStaticText"
123
124
  #
124
125
  # # For Windows
126
+ # # @deprecated
125
127
  # @driver.find_elements :windows_uiautomation, '....'
126
128
  #
127
129
  # # For Tizen
@@ -158,6 +160,12 @@ module Appium
158
160
  private
159
161
 
160
162
  def _set_by_from_finders(how)
163
+ if how == :windows_uiautomation
164
+ ::Appium::Logger.warn(
165
+ '[DEPRECATION] :windows_uiautomation is deprecated. Please use other locators.'
166
+ )
167
+ end
168
+
161
169
  by = FINDERS[how.to_sym]
162
170
  unless by
163
171
  raise ::Appium::Core::Error::ArgumentError,
@@ -213,8 +213,6 @@ module Appium
213
213
  hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'],
214
214
  press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'],
215
215
  long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'],
216
- # keyevent is only for Selendroid
217
- keyevent: [:post, 'session/:session_id/appium/device/keyevent'],
218
216
  push_file: [:post, 'session/:session_id/appium/device/push_file'],
219
217
  pull_file: [:post, 'session/:session_id/appium/device/pull_file'],
220
218
  pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'],
@@ -20,11 +20,13 @@ module Appium
20
20
  class Base
21
21
  module Device
22
22
  module TouchActions
23
+ # @deprecated Use W3C actions instead
23
24
  def touch_actions(actions)
24
25
  actions = { actions: [actions].flatten }
25
26
  execute :touch_actions, {}, actions
26
27
  end
27
28
 
29
+ # @deprecated Use W3C actions instead
28
30
  def multi_touch(actions)
29
31
  execute :multi_touch, {}, actions: actions
30
32
  end
@@ -14,6 +14,9 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
+ #
18
+ # @deprecated Use W3C actions instead
19
+ #
17
20
  # MultiTouch actions allow for multiple touches to happen at the same time,
18
21
  # for instance, to simulate multiple finger swipes.
19
22
  #
@@ -21,6 +24,18 @@ module Appium
21
24
  # add to a new MultiTouch action. When ready, call +prepare()+ and all
22
25
  # actions will be executed simultaneously.
23
26
  #
27
+ # Consider to use W3C spec touch action like the followings.
28
+ # https://www.selenium.dev/selenium/docs/api/rb/Selenium/WebDriver/PointerActions.html
29
+ # https://github.com/appium/ruby_lib_core/blob/master/test/functional/android/webdriver/w3c_actions_test.rb
30
+ # https://github.com/appium/ruby_lib_core/blob/master/test/functional/ios/webdriver/w3c_actions_test.rb
31
+ #
32
+ # About W3C actions
33
+ # https://www.youtube.com/watch?v=oAJ7jwMNFVU
34
+ # https://appiumpro.com/editions/30-ios-specific-touch-action-methods
35
+ # https://appiumpro.com/editions/29-automating-complex-gestures-with-the-w3c-actions-api
36
+ #
37
+ # Functional test code in ruby_lib_core repository also helps.
38
+ #
24
39
  # @example
25
40
  #
26
41
  # @driver = Appium::Core.for(opts).start_driver
@@ -36,6 +51,10 @@ module Appium
36
51
  attr_reader :driver
37
52
 
38
53
  def initialize(driver)
54
+ ::Appium::Logger.warn(
55
+ '[DEPRECATION] Appium::Core::MultiTouch is deprecated in W3C spec. Use W3C actions instead'
56
+ )
57
+
39
58
  @actions = []
40
59
  @driver = driver
41
60
  end
@@ -14,16 +14,26 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
+ #
18
+ # @deprecated Use W3C actions instead
19
+ #
17
20
  # Perform a series of gestures, one after another. Gestures are chained
18
21
  # together and only performed when +perform()+ is called. Default is conducted by global driver.
19
22
  #
20
23
  # Each method returns the object itself, so calls can be chained.
21
24
  #
22
25
  # Consider to use W3C spec touch action like the followings.
23
- # https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/W3CActionBuilder.html
26
+ # https://www.selenium.dev/selenium/docs/api/rb/Selenium/WebDriver/PointerActions.html
24
27
  # https://github.com/appium/ruby_lib_core/blob/master/test/functional/android/webdriver/w3c_actions_test.rb
25
28
  # https://github.com/appium/ruby_lib_core/blob/master/test/functional/ios/webdriver/w3c_actions_test.rb
26
29
  #
30
+ # About W3C actions
31
+ # https://www.youtube.com/watch?v=oAJ7jwMNFVU
32
+ # https://appiumpro.com/editions/30-ios-specific-touch-action-methods
33
+ # https://appiumpro.com/editions/29-automating-complex-gestures-with-the-w3c-actions-api
34
+ #
35
+ # Functional test code in ruby_lib_core repository also helps.
36
+ #
27
37
  # @example
28
38
  #
29
39
  # @driver = Appium::Core.for(opts).start_driver
@@ -39,6 +49,10 @@ module Appium
39
49
  attr_reader :actions, :driver
40
50
 
41
51
  def initialize(driver)
52
+ ::Appium::Logger.warn(
53
+ '[DEPRECATION] Appium::Core::TouchAction is deprecated in W3C spec. Use W3C actions instead'
54
+ )
55
+
42
56
  @actions = []
43
57
  @driver = driver
44
58
  end
@@ -154,8 +154,8 @@ module Appium
154
154
  # @driver.wait_until_true(timeout: 30, interval: 2) { |d| driver.find_element :accessibility_id, 'something' }
155
155
  #
156
156
  def wait_until_true(timeout: nil, interval: nil, message: nil, ignored: nil, &block)
157
- Wait.until_true(timeout: timeout || @wait_timeout || ::Appium::Core::Wait::DEFAULT_TIMEOUT,
158
- interval: interval || @wait_interval || ::Appium::Core::Wait::DEFAULT_INTERVAL,
157
+ Wait.until_true(timeout: timeout || @wait_timeout,
158
+ interval: interval || @wait_interval,
159
159
  message: message,
160
160
  ignored: ignored,
161
161
  object: self,
@@ -190,8 +190,8 @@ module Appium
190
190
  # @driver.wait_until(timeout: 30, interval: 2) { |d| d.find_element :accessibility_id, 'something' }
191
191
  #
192
192
  def wait_until(timeout: nil, interval: nil, message: nil, ignored: nil, &block)
193
- Wait.until(timeout: timeout || @wait_timeout || ::Appium::Core::Wait::DEFAULT_TIMEOUT,
194
- interval: interval || @wait_interval || ::Appium::Core::Wait::DEFAULT_INTERVAL,
193
+ Wait.until(timeout: timeout || @wait_timeout,
194
+ interval: interval || @wait_interval,
195
195
  message: message,
196
196
  ignored: ignored,
197
197
  object: self,
@@ -320,7 +320,7 @@ module Appium
320
320
  #
321
321
  # # Start iOS driver
322
322
  # opts = {
323
- # caps: {
323
+ # capabilities: {
324
324
  # platformName: :ios,
325
325
  # platformVersion: '11.0',
326
326
  # deviceName: 'iPhone Simulator',
@@ -364,7 +364,10 @@ module Appium
364
364
  @driver = ::Appium::Core::Base::Driver.new(listener: @listener,
365
365
  http_client: @http_client,
366
366
  capabilities: @caps, # ::Selenium::WebDriver::Remote::Capabilities
367
- url: @custom_url)
367
+ url: @custom_url,
368
+ wait_timeout: @wait_timeout,
369
+ wait_interval: @wait_interval,
370
+ automation_name: @automation_name)
368
371
 
369
372
  if @direct_connect
370
373
  d_c = DirectConnections.new(@driver.capabilities)
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '5.0.0.rc6' unless defined? ::Appium::Core::VERSION
18
- DATE = '2021-10-23' unless defined? ::Appium::Core::DATE
17
+ VERSION = '5.0.1' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2021-11-23' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
data/release_notes.md CHANGED
@@ -1,3 +1,36 @@
1
+ #### v5.0.1 2021-11-23
2
+
3
+ - [f17ba52](https://github.com/appium/ruby_lib_core/commit/f17ba524608a6e715923331bb9bfff73e0709bcb) Release 5.0.1
4
+ - [ee9cbc4](https://github.com/appium/ruby_lib_core/commit/ee9cbc42e0d3289bb4ab9b403d45867472241e97) feat: relax selenium webdriver version (#357)
5
+ - [4c2948b](https://github.com/appium/ruby_lib_core/commit/4c2948b113106e01c8009555434b4d0fe0ae99f3) chore(deps-dev): update rubocop requirement from = 1.22.3 to = 1.23.0 (#354)
6
+ - [abe2316](https://github.com/appium/ruby_lib_core/commit/abe2316b5a01a27bc657daeb41524afca4187c18) ci: add codeql-analysis (#355)
7
+ - [1c87fc9](https://github.com/appium/ruby_lib_core/commit/1c87fc9b2e1ac7bd869ec61a0dc045b12d5ed887) docs: add link to changelog in migration guide
8
+
9
+
10
+ #### v5.0.0 2021-11-05
11
+
12
+ - [e2d1e2d](https://github.com/appium/ruby_lib_core/commit/e2d1e2da59b10f84b3c8ecafba7be6ab27223b73) Release 5.0.0
13
+ - [ac4c312](https://github.com/appium/ruby_lib_core/commit/ac4c312b7e6b314a5e23463d930fb6a957ec3e8f) chore: cleanup dev dependencies
14
+ - [0c84f30](https://github.com/appium/ruby_lib_core/commit/0c84f30a1623445576df70de54d8c46e40948d18) bump rc to 8
15
+ - [8c42356](https://github.com/appium/ruby_lib_core/commit/8c423566315b47cf99150a38be09b059aab4d358) chore: add deprecated in app management (#353)
16
+ - [5ad23bc](https://github.com/appium/ruby_lib_core/commit/5ad23bc0826c7afa36a95066b65aeb00f1742ad8) chore: use ::Selenium::WebDriver::Interactions.pointer as example (#352)
17
+ - [a77a6eb](https://github.com/appium/ruby_lib_core/commit/a77a6ebd87b1116254c4900cebd900a3d106940e) chore: create links
18
+ - [bc13166](https://github.com/appium/ruby_lib_core/commit/bc13166ac7f2e65d94acdf3cff1841863f4b59fe) chore: tweak the order of changelog
19
+ - [a6fa1b9](https://github.com/appium/ruby_lib_core/commit/a6fa1b9a68584915646ff11fef4cc70a750d5d79) chore: add deprecation mark for windows (#351)
20
+ - [c7286ed](https://github.com/appium/ruby_lib_core/commit/c7286eda8bfbaa49154b12d024187fd384171d4e) chore(deps-dev): update rubocop requirement from = 1.22.2 to = 1.22.3 (#350)
21
+ - [d30dff4](https://github.com/appium/ruby_lib_core/commit/d30dff483dec6d0fec67b01f1a28a8c6612e32e6) bump version to 5.0.0.rc7
22
+ - [7f0fe5a](https://github.com/appium/ruby_lib_core/commit/7f0fe5aedf43c9f81636b8db7efd505e93850f00) chore: add deprecations for TouchAction and Multitouch (#348)
23
+ - [9ed1202](https://github.com/appium/ruby_lib_core/commit/9ed1202a7979500a4744ceb340827b16137eb188) chore: remove selendroid stuff (#349)
24
+ - [fc37c9f](https://github.com/appium/ruby_lib_core/commit/fc37c9f1841fcb7efb5c23cf9200a13d0d35bdcf) chore: pass wait_timeout and wait_interval (#346)
25
+ - [1da3e75](https://github.com/appium/ruby_lib_core/commit/1da3e753907ac431d925a1489a50af3fa406638f) chore: bump to rc6
26
+ - [61ebace](https://github.com/appium/ruby_lib_core/commit/61ebaceaf2d4a6450356a0a51ffe67cab0b33287) feat: add a few new wait syntaxes (#344)
27
+ - [d6f73b1](https://github.com/appium/ruby_lib_core/commit/d6f73b131fd6c8da96b45edfaa6c6db9a85b383a) chore(deps-dev): update rubocop requirement from = 1.22.1 to = 1.22.2 (#345)
28
+ - [0d69af1](https://github.com/appium/ruby_lib_core/commit/0d69af1b93deefd343c910833557a39ceaef59da) chore: cleanup a bit (#342)
29
+ - [115465e](https://github.com/appium/ruby_lib_core/commit/115465e2b73e65dd3777e698d98f1cdaa161f3eb) chore: append example in wait
30
+ - [ad519ee](https://github.com/appium/ruby_lib_core/commit/ad519ee70ba7b7122107b8b2d986ff1523b654d0) chore: update rubocop (#341)
31
+ - [e13b0ef](https://github.com/appium/ruby_lib_core/commit/e13b0efae6b964cc6b0e7b0ed10816eaf6e007d4) feat: selenium v4 base (#315)
32
+
33
+
1
34
  #### v4.7.1 2021-09-26
2
35
 
3
36
  - [cdd8906](https://github.com/appium/ruby_lib_core/commit/cdd890662585aa5051912d20d90ec3c3866ad8b1) Release 4.7.1
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: 5.0.0.rc6
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-23 00:00:00.000000000 Z
11
+ date: 2021-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faye-websocket
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.11.0
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '1.14'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '1.14'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +114,14 @@ dependencies:
128
114
  requirements:
129
115
  - - '='
130
116
  - !ruby/object:Gem::Version
131
- version: 1.22.2
117
+ version: 1.23.0
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - '='
137
123
  - !ruby/object:Gem::Version
138
- version: 1.22.2
124
+ version: 1.23.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: appium_thor
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,34 +136,6 @@ dependencies:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
138
  version: '1.0'
153
- - !ruby/object:Gem::Dependency
154
- name: pry
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: pry-byebug
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
139
  - !ruby/object:Gem::Dependency
182
140
  name: parallel_tests
183
141
  requirement: !ruby/object:Gem::Requirement
@@ -217,6 +175,7 @@ files:
217
175
  - ".github/contributing.md"
218
176
  - ".github/dependabot.yml"
219
177
  - ".github/issue_template.md"
178
+ - ".github/workflows/codeql-analysis.yml"
220
179
  - ".github/workflows/unittest.yml"
221
180
  - ".gitignore"
222
181
  - ".rubocop.yml"
@@ -336,9 +295,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
336
295
  version: '2.6'
337
296
  required_rubygems_version: !ruby/object:Gem::Requirement
338
297
  requirements:
339
- - - ">"
298
+ - - ">="
340
299
  - !ruby/object:Gem::Version
341
- version: 1.3.1
300
+ version: '0'
342
301
  requirements: []
343
302
  rubygems_version: 3.2.15
344
303
  signing_key: