appium_lib_core 1.2.4 → 1.2.5
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 +9 -0
- data/lib/appium_lib_core/common/base/bridge.rb +7 -5
- data/lib/appium_lib_core/common/base/bridge/w3c.rb +4 -0
- data/lib/appium_lib_core/common/base/driver.rb +12 -0
- data/lib/appium_lib_core/common/command.rb +2 -0
- data/lib/appium_lib_core/common/device.rb +0 -5
- data/lib/appium_lib_core/driver.rb +1 -1
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 926da09e2b71204628bf30a3816623e7f31419db
|
4
|
+
data.tar.gz: 176cf553eeca40bcb83b39972ee8b2e67de7d5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50de46fcccbf804027e8cf84a46740be981b4f22679a033f277d16cf167194116df00473b9edea2684aad775cefc6807d57634856b26f760a35625742e3797d9
|
7
|
+
data.tar.gz: 295e932533dda3278df4b75fa99f1823f926187436480b15fbd8a88e9b911966c959227f6bfa85cd1fd2d58ccc80c117ed26d21480c23ed204cdbe22ea3e8bcc
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,15 @@ All notable changes to this project will be documented in this file.
|
|
8
8
|
|
9
9
|
### Deprecations
|
10
10
|
|
11
|
+
## [1.2.5] - 2018-01-13
|
12
|
+
### Enhancements
|
13
|
+
- Enhance W3C support
|
14
|
+
- Timeout related methods
|
15
|
+
|
16
|
+
### Bug fixes
|
17
|
+
|
18
|
+
### Deprecations
|
19
|
+
|
11
20
|
## [1.2.4] - 2018-01-03
|
12
21
|
### Enhancements
|
13
22
|
- Refactor `create_session` in `Appium::Core::Base::Bridge`
|
@@ -5,6 +5,8 @@ module Appium
|
|
5
5
|
# Prefix for extra capability defined by W3C
|
6
6
|
APPIUM_PREFIX = 'appium:'.freeze
|
7
7
|
|
8
|
+
FORCE_MJSONWP = :forceMjsonwp
|
9
|
+
|
8
10
|
# Almost same as self.handshake in ::Selenium::WebDriver::Remote::Bridge
|
9
11
|
#
|
10
12
|
# Implements protocol handshake which:
|
@@ -123,7 +125,7 @@ module Appium
|
|
123
125
|
next if value.is_a?(String) && value.empty?
|
124
126
|
|
125
127
|
capability_name = name.to_s
|
126
|
-
w3c_name =
|
128
|
+
w3c_name = extension_prefix?(capability_name, w3c_capabilities) ? name : "#{APPIUM_PREFIX}#{capability_name}"
|
127
129
|
|
128
130
|
w3c_capabilities[w3c_name] = value
|
129
131
|
end
|
@@ -133,13 +135,13 @@ module Appium
|
|
133
135
|
|
134
136
|
private
|
135
137
|
|
136
|
-
def
|
138
|
+
def extension_prefix?(capability_name, w3c_capabilities)
|
137
139
|
snake_cased_capability_names = ::Selenium::WebDriver::Remote::W3C::Capabilities::KNOWN.map(&:to_s)
|
138
140
|
camel_cased_capability_names = snake_cased_capability_names.map(&w3c_capabilities.method(:camel_case))
|
139
141
|
|
140
142
|
snake_cased_capability_names.include?(capability_name) ||
|
141
143
|
camel_cased_capability_names.include?(capability_name) ||
|
142
|
-
capability_name.
|
144
|
+
capability_name.match(::Selenium::WebDriver::Remote::W3C::Capabilities::EXTENSION_CAPABILITY_PATTERN)
|
143
145
|
end
|
144
146
|
|
145
147
|
def json_create(oss_status, value)
|
@@ -161,7 +163,7 @@ module Appium
|
|
161
163
|
capabilities.each do |name, value|
|
162
164
|
next if value.nil?
|
163
165
|
next if value.is_a?(String) && value.empty?
|
164
|
-
next if name ==
|
166
|
+
next if name == FORCE_MJSONWP
|
165
167
|
|
166
168
|
w3c_capabilities[name] = value
|
167
169
|
end
|
@@ -170,7 +172,7 @@ module Appium
|
|
170
172
|
end
|
171
173
|
|
172
174
|
def merged_capabilities(desired_capabilities)
|
173
|
-
force_mjsonwp = desired_capabilities[
|
175
|
+
force_mjsonwp = desired_capabilities[FORCE_MJSONWP]
|
174
176
|
desired_capabilities = delete_force_mjsonwp(desired_capabilities) unless force_mjsonwp.nil?
|
175
177
|
|
176
178
|
if force_mjsonwp
|
@@ -68,6 +68,18 @@ module Appium
|
|
68
68
|
def logs
|
69
69
|
@logs ||= Logs.new(@bridge)
|
70
70
|
end
|
71
|
+
|
72
|
+
# For W3C.
|
73
|
+
# Get the timeout related settings on the server side.
|
74
|
+
#
|
75
|
+
# @return [Hash]
|
76
|
+
#
|
77
|
+
# @example
|
78
|
+
# @driver.get_timeouts
|
79
|
+
#
|
80
|
+
def get_timeouts
|
81
|
+
@bridge.get_timeouts
|
82
|
+
end
|
71
83
|
end # class Driver
|
72
84
|
end # class Base
|
73
85
|
end # module Core
|
@@ -89,6 +89,8 @@ module Appium
|
|
89
89
|
# The fix will be included in selenium-3.8.2
|
90
90
|
get_page_source: [:get, 'session/:session_id/source'.freeze],
|
91
91
|
|
92
|
+
get_timeouts: [:get, 'session/:session_id/timeouts'.freeze],
|
93
|
+
|
92
94
|
## Add OSS commands to W3C commands
|
93
95
|
### rotatable
|
94
96
|
get_screen_orientation: [:get, 'session/:session_id/orientation'.freeze],
|
@@ -403,11 +403,6 @@ module Appium
|
|
403
403
|
add_endpoint_method method
|
404
404
|
end
|
405
405
|
|
406
|
-
# Don't define selenium-side methods. We pick up from them.
|
407
|
-
# ::Appium::Core::Base::Commands::MJSONWP.each_key do |method|
|
408
|
-
# add_endpoint_method method
|
409
|
-
# end
|
410
|
-
|
411
406
|
add_endpoint_method(:available_contexts) do
|
412
407
|
def available_contexts
|
413
408
|
# return empty array instead of nil on failure
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Core
|
3
|
-
VERSION = '1.2.
|
4
|
-
DATE = '2018-01-
|
3
|
+
VERSION = '1.2.5'.freeze unless defined? ::Appium::Core::VERSION
|
4
|
+
DATE = '2018-01-13'.freeze unless defined? ::Appium::Core::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
#### v1.2.5 2018-01-13
|
2
|
+
|
3
|
+
- [0934b97](https://github.com/appium/ruby_lib_core/commit/0934b977419d6b5359dcc8e5b7c4edcd7f4916f4) Release 1.2.5
|
4
|
+
- [9497621](https://github.com/appium/ruby_lib_core/commit/9497621a62cdee727614d9c48ffff0f0f2faa7da) ignore extensional prefix (#49)
|
5
|
+
- [6337c78](https://github.com/appium/ruby_lib_core/commit/6337c7887873c12093ef854dde5a960bbe199449) update readme
|
6
|
+
- [9cbad5c](https://github.com/appium/ruby_lib_core/commit/9cbad5ca553d513c66508ede5f5f977aeb9f365d) add get timeouts for w3c (#46)
|
7
|
+
- [dacdc36](https://github.com/appium/ruby_lib_core/commit/dacdc3601cdc8a43b974db52ae164170945cc7ba) remove skip tests from unit tests (#45)
|
8
|
+
- [2d5c7ae](https://github.com/appium/ruby_lib_core/commit/2d5c7aed33a524d754cc28b5ae46cec917f48318) Fix typo in documentation of Driver#platform_version (#44)
|
9
|
+
- [d70f244](https://github.com/appium/ruby_lib_core/commit/d70f244ba260fed6c2d522a98d0c5516f3673c47) fix rubocop
|
10
|
+
- [c6f6528](https://github.com/appium/ruby_lib_core/commit/c6f652817b9d1ad104002d067bfb0452074653aa) add unit tests for forceMjsonwp
|
11
|
+
- [591a9bd](https://github.com/appium/ruby_lib_core/commit/591a9bd35b72287f10e47bdeae0de9dc2646b44a) add unit tests for w3c case (#43)
|
12
|
+
|
13
|
+
|
1
14
|
#### v1.2.4 2018-01-03
|
2
15
|
|
3
16
|
- [7032bc0](https://github.com/appium/ruby_lib_core/commit/7032bc02acc44640542eb545067a4125a7f1811f) Release 1.2.4
|
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: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|