appium_lib_core 8.0.1 → 9.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/appium_lib_core.gemspec +2 -2
- data/lib/appium_lib_core/common/base/capabilities.rb +14 -0
- data/lib/appium_lib_core/driver.rb +15 -18
- data/lib/appium_lib_core/version.rb +2 -2
- data/lib/appium_lib_core.rb +5 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccf2b5c0df2ae8489c0c9b3382d260f2464c20828b02484888c7f1c738a42084
|
4
|
+
data.tar.gz: 6aa81ba96bd097f6075a947656533fd20476de3199855827d4278e71449b842e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b7c967d705ffd0034af99c930ed6840e272a064cda6dd461710ac8990413b1ee7de7bbb577e9a3231113ec77c5007b737beb82811600c5d2061d21add41b129
|
7
|
+
data.tar.gz: 24405ae6731acb21cc504d0867410523a63943244d718700b0c24504bdf9cecae0ae54b7e5a647660cd8aec7e5bd9bd6391e160e1796246250e6dfecd78ca2ec
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,20 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
## [9.0.0] - 2024-05-14
|
14
|
+
|
15
|
+
### Deprecations
|
16
|
+
- Stop converting snake cases to camel case for symbols in capabilities
|
17
|
+
- Please define camel/snake cases in capabilities as-is for the WebDriver capabilities
|
18
|
+
- Stop implicit symbolizing capabilities
|
19
|
+
- Historically ruby_lib/ruby_lib_core symbolized capabilities keys from string internally.
|
20
|
+
- `Appium.symbolize_keys` to build symbolized capabilities if issues occurred by this change.
|
21
|
+
|
22
|
+
## [8.0.2] - 2024-04-26
|
23
|
+
|
24
|
+
### Enhancements
|
25
|
+
- Bump thor for publishment module
|
26
|
+
|
13
27
|
## [8.0.1] - 2024-03-26
|
14
28
|
|
15
29
|
### Bug fixes
|
data/appium_lib_core.gemspec
CHANGED
@@ -30,8 +30,8 @@ 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.23.0'
|
33
|
-
spec.add_development_dependency 'rubocop', '1.
|
34
|
-
spec.add_development_dependency 'appium_thor', '~>
|
33
|
+
spec.add_development_dependency 'rubocop', '1.63.5'
|
34
|
+
spec.add_development_dependency 'appium_thor', '~> 2.0'
|
35
35
|
spec.add_development_dependency 'parallel_tests'
|
36
36
|
spec.add_development_dependency 'simplecov'
|
37
37
|
end
|
@@ -23,6 +23,20 @@ module Appium
|
|
23
23
|
# Appium's capabilities could change by depending on Appium versions. So it does not have
|
24
24
|
# standard options like chrome and firefox etc. So, the implementation should differ from
|
25
25
|
# other browsers. But here should inherit `Options` to follow Selenium.
|
26
|
+
|
27
|
+
# Method override
|
28
|
+
# FIXME: when we drop "symbolize_keys", this can be removed.
|
29
|
+
def convert_key(key)
|
30
|
+
case key
|
31
|
+
when String
|
32
|
+
key.to_s
|
33
|
+
when Symbol
|
34
|
+
# here do not convert to camel case
|
35
|
+
key.to_s
|
36
|
+
else
|
37
|
+
raise TypeError, "expected String or Symbol, got #{key.inspect}:#{key.class}"
|
38
|
+
end
|
39
|
+
end
|
26
40
|
end
|
27
41
|
end
|
28
42
|
end
|
@@ -338,12 +338,6 @@ module Appium
|
|
338
338
|
def setup_for_new_session(opts = {})
|
339
339
|
@custom_url = opts.delete :url # to set the custom url as :url
|
340
340
|
|
341
|
-
# TODO: Remove when we implement Options
|
342
|
-
# The symbolize_keys is to keep compatiility for the legacy code, which allows capabilities to give 'string' as the key.
|
343
|
-
# The toplevel `caps`, `capabilities` and `appium_lib` are expected to be symbol.
|
344
|
-
# FIXME: First, please try to remove `nested: true` to `nested: false`.
|
345
|
-
opts = Appium.symbolize_keys(opts, nested: true)
|
346
|
-
|
347
341
|
@caps = get_caps(opts)
|
348
342
|
|
349
343
|
set_appium_lib_specific_values(get_appium_lib_opts(opts))
|
@@ -635,22 +629,27 @@ module Appium
|
|
635
629
|
opts[:appium_lib] || {}
|
636
630
|
end
|
637
631
|
|
632
|
+
# @private
|
633
|
+
def get_app
|
634
|
+
@caps[:app] || @caps['app']
|
635
|
+
end
|
636
|
+
|
638
637
|
# @private
|
639
638
|
# Path to the .apk, .app or .app.zip.
|
640
639
|
# The path can be local, HTTP/S, Windows Share and other path like 'sauce-storage:'.
|
641
640
|
# Use @caps[:app] without modifications if the path isn't HTTP/S or local path.
|
642
641
|
def set_app_path
|
643
642
|
# FIXME: maybe `:app` should check `app` as well.
|
644
|
-
return unless @caps &&
|
645
|
-
return if
|
646
|
-
|
647
|
-
app_path = File.expand_path(
|
648
|
-
@caps[
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
643
|
+
return unless @caps && get_app && !get_app.empty?
|
644
|
+
return if get_app =~ URI::DEFAULT_PARSER.make_regexp
|
645
|
+
|
646
|
+
app_path = File.expand_path(get_app)
|
647
|
+
@caps['app'] = if File.exist? app_path
|
648
|
+
app_path
|
649
|
+
else
|
650
|
+
::Appium::Logger.warn("Use #{get_app} directly since #{app_path} does not exist.")
|
651
|
+
get_app
|
652
|
+
end
|
654
653
|
end
|
655
654
|
|
656
655
|
# @private
|
@@ -676,7 +675,6 @@ module Appium
|
|
676
675
|
# @private
|
677
676
|
def set_appium_device
|
678
677
|
# https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile
|
679
|
-
# TODO: check if the Appium.symbolize_keys(opts, nested: false) enoug with this
|
680
678
|
@device = @caps[:platformName] || @caps['platformName']
|
681
679
|
return @device unless @device
|
682
680
|
|
@@ -685,7 +683,6 @@ module Appium
|
|
685
683
|
|
686
684
|
# @private
|
687
685
|
def set_automation_name
|
688
|
-
# TODO: check if the Appium.symbolize_keys(opts, nested: false) enoug with this
|
689
686
|
candidate = @caps[:automationName] || @caps['automationName']
|
690
687
|
@automation_name = candidate if candidate
|
691
688
|
@automation_name = convert_downcase @automation_name if @automation_name
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '
|
18
|
-
DATE = '2024-
|
17
|
+
VERSION = '9.0.0' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2024-05-14' unless defined? ::Appium::Core::DATE
|
19
19
|
end
|
20
20
|
end
|
data/lib/appium_lib_core.rb
CHANGED
@@ -22,15 +22,17 @@ require_relative 'appium_lib_core/element'
|
|
22
22
|
require_relative 'appium_lib_core/support/event_firing_bridge'
|
23
23
|
|
24
24
|
module Appium
|
25
|
-
# @private
|
26
|
-
#
|
27
25
|
# convert the top level keys to symbols.
|
28
26
|
#
|
29
27
|
# @param [Hash] hash Hash value to make symbolise
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# opts = Appium.symbolize_keys(opts)
|
31
|
+
#
|
30
32
|
def self.symbolize_keys(hash, nested: false, enable_deprecation_msg: true)
|
31
33
|
# FIXME: As https://github.com/appium/ruby_lib/issues/945, we must remove this implicit string to symbol.
|
32
34
|
# But appium_lib_core's some capability handling expect to be symbol, so we should test to remove
|
33
|
-
# the
|
35
|
+
# the methods which expect the symbol first.
|
34
36
|
raise ::Appium::Core::Error::ArgumentError, 'symbolize_keys requires a hash' unless hash.is_a? Hash
|
35
37
|
|
36
38
|
hash.each_with_object({}) do |pair, acc|
|
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: 9.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: 2024-
|
11
|
+
date: 2024-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -114,28 +114,28 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.63.5
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.63.5
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: appium_thor
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '2.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '2.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: parallel_tests
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|