appium_lib_core 5.8.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/README.md +9 -2
- data/appium_lib_core.gemspec +2 -2
- data/lib/appium_lib_core/common/base/bridge.rb +2 -6
- data/lib/appium_lib_core/common/base/search_context.rb +0 -1
- data/lib/appium_lib_core/common/command.rb +4 -0
- data/lib/appium_lib_core/common/device/value.rb +1 -3
- data/lib/appium_lib_core/driver.rb +10 -7
- data/lib/appium_lib_core/version.rb +2 -2
- metadata +8 -12
- data/lib/appium_lib_core/ios/uiautomation/bridge.rb +0 -30
- data/lib/appium_lib_core/ios/uiautomation/device.rb +0 -44
- data/lib/appium_lib_core/ios/uiautomation/patch.rb +0 -34
- data/lib/appium_lib_core/ios.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dba4d2485dc08929f8c9f6a8eeeb6fc6ba00c139b1b35e75889203a02e23078
|
4
|
+
data.tar.gz: 35da3fd8409a3a10c71a6b8f5ea59709e9ff4144e8e3a59aa8ddccbbe3bffded
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b82f7a9c8868d97eddfee6fa85f1f2be3346ce268b23bbd264c02cad05e9f183ab46b40f717b9ae9e4ddfa15015e18108ec79e748f66996f33710fbb84933557
|
7
|
+
data.tar.gz: e02175948f0ff3a6b0e37e52e537c21262d9422e2027643d76f1b46eac55cd35b03f9fec1381ee3f3a9c4179b1888008bbbc5e9435df218d12c399efa76b8943
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,15 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
## [6.1.0] - 2023-01-18
|
14
|
+
|
15
|
+
### Bug fixes
|
16
|
+
- `Element#immediate_value` sends `text` as the request body
|
17
|
+
|
18
|
+
## [6.0.0] - 2022-12-25
|
19
|
+
- Remove iOS/UiAutomation classes
|
20
|
+
- The version may work for iOS 8. XCUITest driver will be the default behavior for iOS.
|
21
|
+
|
13
22
|
## [5.8.0] - 2022-12-11
|
14
23
|
|
15
24
|
### Enhancements
|
@@ -24,7 +33,7 @@ Read `release_notes.md` for commit level details.
|
|
24
33
|
## [5.6.0] - 2022-11-08
|
25
34
|
|
26
35
|
### Enhancements
|
27
|
-
- Append `
|
36
|
+
- Append `selenium-webdriver` `4.6` support
|
28
37
|
|
29
38
|
## [5.5.2] - 2022-10-11
|
30
39
|
|
data/README.md
CHANGED
@@ -32,6 +32,13 @@ $ bundle install
|
|
32
32
|
$ bundle exec parallel_test test/unit/
|
33
33
|
```
|
34
34
|
|
35
|
+
or
|
36
|
+
|
37
|
+
```bash
|
38
|
+
$ bundle install
|
39
|
+
$ bundle exec rake test:unit
|
40
|
+
```
|
41
|
+
|
35
42
|
### Functional Tests
|
36
43
|
Run functional tests which require the Appium server and real device, Simulator/Emulator.
|
37
44
|
|
@@ -107,8 +114,8 @@ $ IGNORE_VERSION_SKIP=true CI=true bundle exec rake test:func:android
|
|
107
114
|
platformName: 'ios',
|
108
115
|
platformVersion: '11.0',
|
109
116
|
deviceName: 'iPhone Simulator',
|
110
|
-
|
111
|
-
|
117
|
+
# app: '/path/to/MyiOS.app', # Without 'app' capability, an appium session starts with the home screen
|
118
|
+
automationName: 'XCUITest'
|
112
119
|
},
|
113
120
|
appium_lib: {
|
114
121
|
wait: 30
|
data/appium_lib_core.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'appium_lib_core/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.required_ruby_version = '>= 2.7'
|
7
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
|
8
8
|
|
9
9
|
spec.name = 'appium_lib_core'
|
10
10
|
spec.version = Appium::Core::VERSION
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
31
31
|
spec.add_development_dependency 'minitest-reporters', '~> 1.1'
|
32
32
|
spec.add_development_dependency 'webmock', '~> 3.18.1'
|
33
|
-
spec.add_development_dependency 'rubocop', '1.
|
33
|
+
spec.add_development_dependency 'rubocop', '1.42.0'
|
34
34
|
spec.add_development_dependency 'appium_thor', '~> 1.0'
|
35
35
|
spec.add_development_dependency 'parallel_tests'
|
36
36
|
spec.add_development_dependency 'simplecov'
|
@@ -211,11 +211,6 @@ module Appium
|
|
211
211
|
::Appium::Core::Base::Capabilities.json_create execute(:get_capabilities)
|
212
212
|
end
|
213
213
|
|
214
|
-
# Override for safe. Newer ruby selenium webdriver already has the same code
|
215
|
-
def page_source
|
216
|
-
execute :get_page_source
|
217
|
-
end
|
218
|
-
|
219
214
|
# For Appium
|
220
215
|
# override
|
221
216
|
def element_displayed?(element)
|
@@ -229,7 +224,8 @@ module Appium
|
|
229
224
|
# override
|
230
225
|
def element_attribute(element, name)
|
231
226
|
# For W3C in Selenium Client
|
232
|
-
# execute_atom :getAttribute, element, name
|
227
|
+
# execute_atom :getAttribute, element, name.
|
228
|
+
# 'dom_attribute' in the WebDriver Selenium.
|
233
229
|
execute :get_element_attribute, id: element.id, name: name
|
234
230
|
end
|
235
231
|
|
@@ -28,7 +28,6 @@ module Appium
|
|
28
28
|
data_matcher: '-android datamatcher', # Available in Espresso
|
29
29
|
view_matcher: '-android viewmatcher', # Available in Espresso
|
30
30
|
# iOS
|
31
|
-
uiautomation: '-ios uiautomation',
|
32
31
|
predicate: '-ios predicate string',
|
33
32
|
class_chain: '-ios class chain',
|
34
33
|
# Windows with windows prefix
|
@@ -70,11 +70,15 @@ module Appium
|
|
70
70
|
find_elements: [:post, 'session/:session_id/elements'],
|
71
71
|
find_child_element: [:post, 'session/:session_id/element/:id/element'],
|
72
72
|
find_child_elements: [:post, 'session/:session_id/element/:id/elements'],
|
73
|
+
find_shadow_child_element: [:post, 'session/:session_id/shadow/:id/element'],
|
74
|
+
find_shadow_child_elements: [:post, 'session/:session_id/shadow/:id/elements'],
|
73
75
|
get_active_element: [:get, 'session/:session_id/element/active'],
|
74
76
|
is_element_selected: [:get, 'session/:session_id/element/:id/selected'],
|
75
77
|
get_element_attribute: [:get, 'session/:session_id/element/:id/attribute/:name'],
|
76
78
|
get_element_property: [:get, 'session/:session_id/element/:id/property/:name'],
|
77
79
|
get_element_css_value: [:get, 'session/:session_id/element/:id/css/:property_name'],
|
80
|
+
get_element_aria_role: [:get, 'session/:session_id/element/:id/computedrole'],
|
81
|
+
get_element_aria_label: [:get, 'session/:session_id/element/:id/computedlabel'],
|
78
82
|
get_element_text: [:get, 'session/:session_id/element/:id/text'],
|
79
83
|
get_element_tag_name: [:get, 'session/:session_id/element/:id/name'],
|
80
84
|
get_element_rect: [:get, 'session/:session_id/element/:id/rect'],
|
@@ -41,9 +41,7 @@ module Appium
|
|
41
41
|
# Keep .split(//) for backward compatibility for now
|
42
42
|
text = keys.join
|
43
43
|
|
44
|
-
|
45
|
-
# { value: text.split(//), text: text }
|
46
|
-
{ value: text.chars }
|
44
|
+
{ text: text }
|
47
45
|
end
|
48
46
|
end # module Value
|
49
47
|
end # module Device
|
@@ -23,7 +23,6 @@ module Appium
|
|
23
23
|
end
|
24
24
|
|
25
25
|
module Ios
|
26
|
-
autoload :Uiautomation, 'appium_lib_core/ios'
|
27
26
|
autoload :Xcuitest, 'appium_lib_core/ios_xcuitest'
|
28
27
|
end
|
29
28
|
|
@@ -328,7 +327,7 @@ module Appium
|
|
328
327
|
public
|
329
328
|
|
330
329
|
# @private
|
331
|
-
# Set up for a
|
330
|
+
# Set up for a new session
|
332
331
|
def setup_for_new_session(opts = {})
|
333
332
|
@custom_url = opts.delete :url # to set the custom url as :url
|
334
333
|
|
@@ -443,7 +442,7 @@ module Appium
|
|
443
442
|
@driver
|
444
443
|
end
|
445
444
|
|
446
|
-
# @
|
445
|
+
# @private
|
447
446
|
# Attach to an existing session
|
448
447
|
def attach_to(session_id, url: nil, automation_name: nil, platform_name: nil,
|
449
448
|
http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
@@ -509,7 +508,7 @@ module Appium
|
|
509
508
|
{}
|
510
509
|
end
|
511
510
|
|
512
|
-
# Quits the driver
|
511
|
+
# [Deprecated] Quits the driver. This method is the same as @driver.quit
|
513
512
|
# @return [void]
|
514
513
|
#
|
515
514
|
# @example
|
@@ -517,6 +516,7 @@ module Appium
|
|
517
516
|
# @core.quit_driver
|
518
517
|
#
|
519
518
|
def quit_driver
|
519
|
+
::Appium::Logger.warn('[DEPRECATION] quit_driver will be removed. Please use @driver.quit instead.')
|
520
520
|
@driver.quit
|
521
521
|
rescue # rubocop:disable Style/RescueStandardError
|
522
522
|
nil
|
@@ -562,6 +562,11 @@ module Appium
|
|
562
562
|
# @core.platform_version #=> [10,1,1]
|
563
563
|
#
|
564
564
|
def platform_version
|
565
|
+
::Appium::Logger.warn(
|
566
|
+
'[DEPRECATION] platform_version method will be. ' \
|
567
|
+
'Please check the platformVersion via @driver.capabilities["platformVersion"] instead.'
|
568
|
+
)
|
569
|
+
|
565
570
|
p_version = @driver.capabilities['platformVersion'] || @driver.session_capabilities['platformVersion']
|
566
571
|
p_version.split('.').map(&:to_i)
|
567
572
|
end
|
@@ -599,10 +604,8 @@ module Appium
|
|
599
604
|
case sym_automation_name
|
600
605
|
when :safari
|
601
606
|
::Appium::Logger.debug('SafariDriver for iOS')
|
602
|
-
|
607
|
+
else # XCUITest
|
603
608
|
::Appium::Core::Ios::Xcuitest::Bridge.for self
|
604
|
-
else # default and UIAutomation
|
605
|
-
::Appium::Core::Ios::Uiautomation::Bridge.for self
|
606
609
|
end
|
607
610
|
when :mac
|
608
611
|
case sym_automation_name
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '
|
18
|
-
DATE = '
|
17
|
+
VERSION = '6.1.0' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2023-01-18' unless defined? ::Appium::Core::DATE
|
19
19
|
end
|
20
20
|
end
|
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:
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.
|
123
|
+
version: 1.42.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 1.
|
130
|
+
version: 1.42.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: appium_thor
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,12 +247,8 @@ files:
|
|
247
247
|
- lib/appium_lib_core/device.rb
|
248
248
|
- lib/appium_lib_core/driver.rb
|
249
249
|
- lib/appium_lib_core/element.rb
|
250
|
-
- lib/appium_lib_core/ios.rb
|
251
250
|
- lib/appium_lib_core/ios/device.rb
|
252
251
|
- lib/appium_lib_core/ios/device/clipboard.rb
|
253
|
-
- lib/appium_lib_core/ios/uiautomation/bridge.rb
|
254
|
-
- lib/appium_lib_core/ios/uiautomation/device.rb
|
255
|
-
- lib/appium_lib_core/ios/uiautomation/patch.rb
|
256
252
|
- lib/appium_lib_core/ios/xcuitest/bridge.rb
|
257
253
|
- lib/appium_lib_core/ios/xcuitest/device.rb
|
258
254
|
- lib/appium_lib_core/ios/xcuitest/device/battery.rb
|
@@ -273,7 +269,7 @@ homepage: https://github.com/appium/ruby_lib_core/
|
|
273
269
|
licenses:
|
274
270
|
- Apache-2.0
|
275
271
|
metadata: {}
|
276
|
-
post_install_message:
|
272
|
+
post_install_message:
|
277
273
|
rdoc_options: []
|
278
274
|
require_paths:
|
279
275
|
- lib
|
@@ -288,8 +284,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
284
|
- !ruby/object:Gem::Version
|
289
285
|
version: '0'
|
290
286
|
requirements: []
|
291
|
-
rubygems_version: 3.
|
292
|
-
signing_key:
|
287
|
+
rubygems_version: 3.2.14
|
288
|
+
signing_key:
|
293
289
|
specification_version: 4
|
294
290
|
summary: Minimal Ruby library for Appium.
|
295
291
|
test_files: []
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module Appium
|
16
|
-
module Core
|
17
|
-
module Ios
|
18
|
-
module Uiautomation
|
19
|
-
module Bridge
|
20
|
-
def self.for(target)
|
21
|
-
target.extend Appium::Core::Ios::Device
|
22
|
-
|
23
|
-
Core::Ios::Uiautomation.patch_webdriver_element
|
24
|
-
Core::Ios::Uiautomation::Device.add_methods
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module Appium
|
16
|
-
module Core
|
17
|
-
module Ios
|
18
|
-
module Uiautomation
|
19
|
-
module Device
|
20
|
-
def self.add_methods
|
21
|
-
# UiAutomation, Override included method in bridge
|
22
|
-
::Appium::Core::Device.add_endpoint_method(:hide_keyboard) do
|
23
|
-
def hide_keyboard(close_key = nil, strategy = nil)
|
24
|
-
option = {}
|
25
|
-
|
26
|
-
option[:key] = close_key || 'Done' # default to Done key.
|
27
|
-
option[:strategy] = strategy || :pressKey # default to pressKey
|
28
|
-
|
29
|
-
execute :hide_keyboard, {}, option
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# UiAutomation, Override included method in bridge
|
34
|
-
::Appium::Core::Device.add_endpoint_method(:background_app) do
|
35
|
-
def background_app(duration = 0)
|
36
|
-
execute :background_app, {}, seconds: duration
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end # module Device
|
41
|
-
end # module Uiautomation
|
42
|
-
end # module Ios
|
43
|
-
end # module Core
|
44
|
-
end # module Appium
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module Appium
|
16
|
-
module Core
|
17
|
-
module Ios
|
18
|
-
module Uiautomation
|
19
|
-
# @private
|
20
|
-
# class_eval inside a method because class Selenium::WebDriver::Element
|
21
|
-
# will trigger as soon as the file is required. in contrast a method
|
22
|
-
# will trigger only when invoked.
|
23
|
-
def self.patch_webdriver_element
|
24
|
-
::Appium::Core::Element.class_eval do
|
25
|
-
# Cross platform way of entering text into a textfield
|
26
|
-
def type(text, driver)
|
27
|
-
driver.execute_script %(au.getElement('#{ref}').setValue('#{text}');)
|
28
|
-
end # def type
|
29
|
-
end # Selenium::WebDriver::Element.class_eval
|
30
|
-
end # def patch_webdriver_element
|
31
|
-
end # module Uiautomation
|
32
|
-
end # module Ios
|
33
|
-
end # module Core
|
34
|
-
end # module Appium
|
data/lib/appium_lib_core/ios.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
# loaded in common/driver.rb
|
16
|
-
require_relative 'ios/device'
|
17
|
-
|
18
|
-
require_relative 'ios/uiautomation/patch'
|
19
|
-
require_relative 'ios/uiautomation/device'
|
20
|
-
require_relative 'ios/uiautomation/bridge'
|