appium_lib_core 5.0.0.rc1 → 5.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/appium_lib_core.gemspec +1 -1
- data/lib/appium_lib_core/common/base/bridge.rb +2 -2
- data/lib/appium_lib_core/common/base/capabilities.rb +7 -0
- data/lib/appium_lib_core/common/base/driver.rb +1 -17
- data/lib/appium_lib_core/driver.rb +7 -15
- data/lib/appium_lib_core/version.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eba36b9dee77259cd1a14dd0e03c3a140a0e4bcb014d3d7d277ca9d4c47e011
|
4
|
+
data.tar.gz: 511a0a3fa46c55f078185c8d25262ec4c6b5d281be628a2217df1d90fd58d331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a0de22452cdfa19f9e9aa71dd1b29bedc17c0b431860c7db5bbccb4f50ff83e08db3103caa5ad9e40aaf526518c072ee32563a7139d126222c63d52375048e
|
7
|
+
data.tar.gz: 868a920d5221fba2e9e9e3c583a7e5c81cd00bbdf19680ef4795ae23cb71ea773fdce24889935574190a82d888f8ba7f99f1e98e3f86ddd3dab344710598675a
|
data/CHANGELOG.md
CHANGED
@@ -17,6 +17,8 @@ Read `release_notes.md` for commit level details.
|
|
17
17
|
- Support only W3C spec
|
18
18
|
- Support Ruby 2.5+
|
19
19
|
- Raises `::Appium::Core::Error::ArgumentError` instead of `ArgumentError` for this library specific argument errors
|
20
|
+
- Removed `desired_capabilities` from capabilities. Please use `capabilities` instead.
|
21
|
+
- `element.ref` returns not only element id. It returns an array like `[:driver, id]`. You should do `_, element_id = element.ref` to get the element id
|
20
22
|
|
21
23
|
## [4.7.0] - 2021-07-17
|
22
24
|
|
data/appium_lib_core.gemspec
CHANGED
@@ -22,7 +22,7 @@ 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.0.rc2'
|
26
26
|
spec.add_runtime_dependency 'faye-websocket', '~> 0.11.0'
|
27
27
|
|
28
28
|
spec.add_development_dependency 'bundler', '>= 1.14'
|
@@ -53,7 +53,7 @@ module Appium
|
|
53
53
|
# Override
|
54
54
|
# Creates session handling both OSS and W3C dialects.
|
55
55
|
#
|
56
|
-
# @param [::Selenium::WebDriver::Remote::Capabilities, Hash]
|
56
|
+
# @param [::Selenium::WebDriver::Remote::Capabilities, Hash] capabilities A capability
|
57
57
|
# @return [::Selenium::WebDriver::Remote::Capabilities]
|
58
58
|
#
|
59
59
|
# @example
|
@@ -78,7 +78,7 @@ module Appium
|
|
78
78
|
@available_commands = ::Appium::Core::Commands::COMMANDS.dup
|
79
79
|
|
80
80
|
caps = add_appium_prefix(capabilities)
|
81
|
-
response = execute(:new_session, {}, { capabilities: { firstMatch: [
|
81
|
+
response = execute(:new_session, {}, { capabilities: { alwaysMatch: caps, firstMatch: [] } })
|
82
82
|
|
83
83
|
@session_id = response['sessionId']
|
84
84
|
raise ::Selenium::WebDriver::Error::WebDriverError, 'no sessionId in returned payload' unless @session_id
|
@@ -22,6 +22,13 @@ module Appium
|
|
22
22
|
# @return [::Selenium::WebDriver::Remote::Capabilities] Return instance of Appium::Core::Base::Capabilities
|
23
23
|
# inherited ::Selenium::WebDriver::Remote::Capabilities
|
24
24
|
def self.create_capabilities(opts_caps = {})
|
25
|
+
# TODO: Move to 'Options' way instead of 'Capabilities'.
|
26
|
+
# Selenium 5 will have Options instead of 'Capabilities'.
|
27
|
+
# https://github.com/SeleniumHQ/selenium/blob/trunk/rb/lib/selenium/webdriver/common/options.rb
|
28
|
+
# Then, Ruby client also shoud move to the Options way.
|
29
|
+
# Appium's capabilities could change by depending on Appium versions. So it does not have
|
30
|
+
# standard options like chrome and firefox etc. So, the implementation should differ from
|
31
|
+
# other browsers. But here should inherit `Options` to follow Selenium.
|
25
32
|
::Selenium::WebDriver::Remote::Capabilities.new(opts_caps)
|
26
33
|
end
|
27
34
|
end
|
@@ -57,23 +57,7 @@ module Appium
|
|
57
57
|
# @return [::Appium::Core::Base::Bridge]
|
58
58
|
#
|
59
59
|
def create_bridge(**opts)
|
60
|
-
|
61
|
-
# NOTE: This is deprecated
|
62
|
-
cap_array = caps.is_a?(Hash) ? [caps] : Array(caps)
|
63
|
-
|
64
|
-
desired_capabilities = opts.delete(:desired_capabilities)
|
65
|
-
if desired_capabilities
|
66
|
-
if desired_capabilities.is_a?(Hash)
|
67
|
-
desired_capabilities = ::Selenium::WebDriver::Remote::Capabilities(desired_capabilities)
|
68
|
-
end
|
69
|
-
cap_array << desired_capabilities
|
70
|
-
end
|
71
|
-
|
72
|
-
options = opts.delete(:options)
|
73
|
-
cap_array << options if options
|
74
|
-
|
75
|
-
capabilities = generate_capabilities(cap_array)
|
76
|
-
|
60
|
+
capabilities = opts.delete(:capabilities)
|
77
61
|
bridge_opts = { http_client: opts.delete(:http_client), url: opts.delete(:url) }
|
78
62
|
raise ::Appium::Core::Error::ArgumentError, "Unable to create a driver with parameters: #{opts}" unless opts.empty?
|
79
63
|
|
@@ -187,8 +187,6 @@ module Appium
|
|
187
187
|
# @option opts [Hash] :caps Appium capabilities.
|
188
188
|
# @option opts [Hash] :capabilities The same as :caps.
|
189
189
|
# This param is for compatibility with Selenium WebDriver format
|
190
|
-
# @option opts [Hash] :desired_capabilities The same as :caps.
|
191
|
-
# This param is for compatibility with Selenium WebDriver format
|
192
190
|
# @option opts [Appium::Core::Options] :appium_lib Capabilities affect only ruby client
|
193
191
|
# @option opts [String] :url The same as :custom_url in :appium_lib.
|
194
192
|
# This param is for compatibility with Selenium WebDriver format
|
@@ -199,10 +197,8 @@ module Appium
|
|
199
197
|
#
|
200
198
|
# # format 1
|
201
199
|
# @core = Appium::Core.for caps: {...}, appium_lib: {...}
|
202
|
-
# # format 2. 'capabilities:'
|
200
|
+
# # format 2. 'capabilities:' is also available instead of 'caps:'.
|
203
201
|
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", capabilities: {...}, appium_lib: {...}
|
204
|
-
# # format 3. 'appium_lib: {...}' can be blank
|
205
|
-
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", desired_capabilities: {...}
|
206
202
|
#
|
207
203
|
#
|
208
204
|
# require 'rubygems'
|
@@ -230,7 +226,7 @@ module Appium
|
|
230
226
|
# @core.start_driver # Connect to 'http://127.0.0.1:8080/wd/hub' because of 'port: 8080'
|
231
227
|
#
|
232
228
|
# # Start iOS driver with .zip file over HTTP
|
233
|
-
# #
|
229
|
+
# # 'capabilities:' is also available instead of 'caps:'. Either is fine.
|
234
230
|
# opts = {
|
235
231
|
# capabilities: {
|
236
232
|
# platformName: :ios,
|
@@ -254,7 +250,7 @@ module Appium
|
|
254
250
|
# # Start iOS driver as another format. 'url' is available like below
|
255
251
|
# opts = {
|
256
252
|
# url: "http://custom-host:8080/wd/hub.com",
|
257
|
-
#
|
253
|
+
# capabilities: {
|
258
254
|
# platformName: :ios,
|
259
255
|
# platformVersion: '11.0',
|
260
256
|
# deviceName: 'iPhone Simulator',
|
@@ -368,8 +364,8 @@ module Appium
|
|
368
364
|
|
369
365
|
begin
|
370
366
|
@driver = ::Appium::Core::Base::Driver.new(listener: @listener,
|
371
|
-
|
372
|
-
|
367
|
+
http_client: @http_client,
|
368
|
+
capabilities: @caps, # ::Selenium::WebDriver::Remote::Capabilities
|
373
369
|
url: @custom_url)
|
374
370
|
|
375
371
|
if @direct_connect
|
@@ -567,10 +563,7 @@ module Appium
|
|
567
563
|
def validate_keys(opts)
|
568
564
|
flatten_ops = flatten_hash_keys(opts)
|
569
565
|
|
570
|
-
|
571
|
-
unless opts.member?(:caps) || opts.member?(:capabilities) || opts.member?(:desired_capabilities)
|
572
|
-
raise Error::NoCapabilityError
|
573
|
-
end
|
566
|
+
raise Error::NoCapabilityError unless opts.member?(:caps) || opts.member?(:capabilities)
|
574
567
|
|
575
568
|
if !opts.member?(:appium_lib) && flatten_ops.member?(:appium_lib)
|
576
569
|
raise Error::CapabilityStructureError, 'Please check the value of appium_lib in the capability'
|
@@ -591,8 +584,7 @@ module Appium
|
|
591
584
|
|
592
585
|
# @private
|
593
586
|
def get_caps(opts)
|
594
|
-
|
595
|
-
Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:capabilities] || opts[:desired_capabilities] || {})
|
587
|
+
Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:capabilities] || {})
|
596
588
|
end
|
597
589
|
|
598
590
|
# @private
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '5.0.0.
|
18
|
-
DATE = '2021-
|
17
|
+
VERSION = '5.0.0.rc2' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2021-10-01' 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: 5.0.0.
|
4
|
+
version: 5.0.0.rc2
|
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-
|
11
|
+
date: 2021-10-01 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.0.rc2
|
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.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faye-websocket
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|