appium_lib_core 2.3.0 → 2.3.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +29 -30
- data/lib/appium_lib_core/android/device.rb +10 -2
- data/lib/appium_lib_core/android/device/network.rb +6 -6
- data/lib/appium_lib_core/common/ws/websocket.rb +5 -5
- data/lib/appium_lib_core/driver.rb +4 -1
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +8 -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: 2c10b3d610607f773263b41a6fcc8a1ef3486214
|
4
|
+
data.tar.gz: 36827f23fa7146ef3311e5b87ec3154cbea0b70b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad6af80ee422db86a404ab8fb5fce1ce832c10e2c7cd0f90c4fca6e9a87796bea12a9e8cbd6f47591d1bbf23194fffa013877dd3d0ac69f4ea286b3789762152
|
7
|
+
data.tar.gz: 2798ad4bb81887889cbb2e393aa6546b3c1830eb85006128645faeafe565b5cd1f11ed2eb38185452cb6fbed9d24a2ac268eb9cfc89d70e7add781ec5bfd7038
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,16 @@ Read `release_notes.md` for commit level details.
|
|
9
9
|
|
10
10
|
### Deprecations
|
11
11
|
|
12
|
+
## [2.3.1] - 2019-01-13
|
13
|
+
### Enhancements
|
14
|
+
- `set_network_connection` accepts keys as same as `network_connection_type` in addition to numbers
|
15
|
+
- `{ :airplane_mode: 1, wifi: 2, data: 4, all: 6, none: 0 }`
|
16
|
+
- Read [documentation](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device#set_network_connection-instance_method) more
|
17
|
+
|
18
|
+
### Bug fixes
|
19
|
+
|
20
|
+
### Deprecations
|
21
|
+
|
12
22
|
## [2.3.0] - 2019-01-07
|
13
23
|
### Enhancements
|
14
24
|
- Use `Base64.strict_encode64` when this client sends `Base64` encoded data to server
|
data/README.md
CHANGED
@@ -67,37 +67,36 @@ $ PARALLEL=1 bundle exec parallel_test test/functional/ios -n 2
|
|
67
67
|
2. Run the following script.
|
68
68
|
|
69
69
|
- `test.rb`
|
70
|
-
|
71
|
-
require 'rubygems'
|
72
|
-
require 'appium_lib_core'
|
73
|
-
|
74
|
-
opts = {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
86
|
-
@core = Appium::Core.for(opts) # create a core driver with `opts`
|
87
|
-
@driver = @core.start_driver
|
88
|
-
|
89
|
-
# Launch iPhone Simulator and `MyiOS.app`
|
90
|
-
@driver.find_element(:accessibility_id, 'some accessibility') # find an element
|
91
|
-
```
|
92
|
-
|
70
|
+
```ruby
|
71
|
+
require 'rubygems'
|
72
|
+
require 'appium_lib_core'
|
73
|
+
|
74
|
+
opts = {
|
75
|
+
desired_capabilities: { # or { caps: {....} }
|
76
|
+
platformName: :ios,
|
77
|
+
platformVersion: '11.0',
|
78
|
+
deviceName: 'iPhone Simulator',
|
79
|
+
automationName: 'XCUITest',
|
80
|
+
app: '/path/to/MyiOS.app'
|
81
|
+
},
|
82
|
+
appium_lib: {
|
83
|
+
wait: 30
|
84
|
+
}
|
85
|
+
}
|
86
|
+
@core = Appium::Core.for(opts) # create a core driver with `opts`
|
87
|
+
@driver = @core.start_driver
|
88
|
+
|
89
|
+
# Launch iPhone Simulator and `MyiOS.app`
|
90
|
+
@driver.find_element(:accessibility_id, 'some accessibility') # find an element
|
91
|
+
```
|
93
92
|
- Run the script
|
94
|
-
```bash
|
95
|
-
# shell 1
|
96
|
-
$ appium --log-level warn:error # show only warning and error logs
|
97
|
-
|
98
|
-
# shell 2
|
99
|
-
$ ruby test.rb
|
100
|
-
```
|
93
|
+
```bash
|
94
|
+
# shell 1
|
95
|
+
$ appium --log-level warn:error # show only warning and error logs
|
96
|
+
|
97
|
+
# shell 2
|
98
|
+
$ ruby test.rb
|
99
|
+
```
|
101
100
|
|
102
101
|
# Development
|
103
102
|
- Demo app
|
@@ -60,10 +60,14 @@ module Appium
|
|
60
60
|
# @!method get_network_connection
|
61
61
|
# Get the device network connection current status
|
62
62
|
# See set_network_connection method for return value
|
63
|
+
# Same as `#network_connection_type` in selenium-webdriver.
|
64
|
+
#
|
65
|
+
# Returns a key of {:airplane_mode: 1, wifi: 2, data: 4, all: 6, none: 0} in `#network_connection_type`
|
66
|
+
# Returns a number of the mode in `#get_network_connection`
|
63
67
|
#
|
64
68
|
# @example
|
65
69
|
#
|
66
|
-
# @driver.network_connection_type #=>
|
70
|
+
# @driver.network_connection_type #=> :all
|
67
71
|
# @driver.get_network_connection #=> 6
|
68
72
|
#
|
69
73
|
|
@@ -143,7 +147,10 @@ module Appium
|
|
143
147
|
|
144
148
|
# @!method set_network_connection(mode)
|
145
149
|
# Set the device network connection mode
|
150
|
+
# Same as `#network_connection_type` in selenium-webdriver.
|
151
|
+
#
|
146
152
|
# @param [String] mode Bit mask that represent the network mode
|
153
|
+
# Or the key matched with `{:airplane_mode: 1, wifi: 2, data: 4, all: 6, none: 0}`
|
147
154
|
#
|
148
155
|
# Value (Alias) | Data | Wifi | Airplane Mode
|
149
156
|
# -------------------------------------------------
|
@@ -156,7 +163,8 @@ module Appium
|
|
156
163
|
# @example
|
157
164
|
#
|
158
165
|
# @driver.set_network_connection 1
|
159
|
-
# @driver.
|
166
|
+
# @driver.set_network_connection :airplane_mode
|
167
|
+
# @driver.network_connection_type = :airplane_mode # As selenium-webdriver
|
160
168
|
#
|
161
169
|
|
162
170
|
# @!method get_performance_data_types
|
@@ -24,12 +24,12 @@ module Appium
|
|
24
24
|
|
25
25
|
::Appium::Core::Device.add_endpoint_method(:set_network_connection) do
|
26
26
|
def set_network_connection(mode)
|
27
|
-
#
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
execute :set_network_connection, {}, type:
|
27
|
+
# same as ::Selenium::WebDriver::DriverExtensions::HasNetworkConnection
|
28
|
+
# But this method accept number
|
29
|
+
connection_type = { airplane_mode: 1, wifi: 2, data: 4, all: 6, none: 0 }
|
30
|
+
type = connection_type.key?(mode) ? connection_type[mode] : mode.to_i
|
31
|
+
|
32
|
+
execute :set_network_connection, {}, type: type
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -56,8 +56,8 @@ module Appium
|
|
56
56
|
#
|
57
57
|
# Sends a ping frame with an optional message and fires the callback when a matching pong is received.
|
58
58
|
#
|
59
|
-
# @
|
60
|
-
# @
|
59
|
+
# @param [String] message A message to send ping.
|
60
|
+
# @param [Block] &callback
|
61
61
|
#
|
62
62
|
# @example
|
63
63
|
# ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat")
|
@@ -70,7 +70,7 @@ module Appium
|
|
70
70
|
# Accepts either a String or an Array of byte-sized integers and sends a text or binary message over the connection
|
71
71
|
# to the other peer; binary data must be encoded as an Array.
|
72
72
|
#
|
73
|
-
# @
|
73
|
+
# @param [String|Array] message A message to send a text or binary message over the connection
|
74
74
|
#
|
75
75
|
# @example
|
76
76
|
# ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat")
|
@@ -82,8 +82,8 @@ module Appium
|
|
82
82
|
|
83
83
|
# Closes the connection, sending the given status code and reason text, both of which are optional.
|
84
84
|
#
|
85
|
-
# @
|
86
|
-
# @
|
85
|
+
# @param [Integer] code: A status code to send to the peer with close signal. Default is nil.
|
86
|
+
# @param [String] reason: A reason to send to the peer with close signal. Default is 'close from ruby_lib_core'.
|
87
87
|
#
|
88
88
|
# @example
|
89
89
|
# ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat")
|
@@ -383,8 +383,11 @@ module Appium
|
|
383
383
|
# no windows specific extentions
|
384
384
|
Appium::Logger.debug('windows')
|
385
385
|
when :tizen
|
386
|
-
#
|
386
|
+
# https://github.com/Samsung/appium-tizen-driver
|
387
387
|
Appium::Logger.debug('tizen')
|
388
|
+
when :youiengine
|
389
|
+
# https://github.com/YOU-i-Labs/appium-youiengine-driver
|
390
|
+
Appium::Logger.debug('YouiEngine')
|
388
391
|
else
|
389
392
|
Appium::Logger.warn('no device matched')
|
390
393
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Core
|
3
|
-
VERSION = '2.3.
|
4
|
-
DATE = '2019-01-
|
3
|
+
VERSION = '2.3.1'.freeze unless defined? ::Appium::Core::VERSION
|
4
|
+
DATE = '2019-01-13'.freeze unless defined? ::Appium::Core::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
#### v2.3.1 2019-01-13
|
2
|
+
|
3
|
+
- [12ace90](https://github.com/appium/ruby_lib_core/commit/12ace906df63a8e4d4377b402ada2d90bd7509af) Release 2.3.1
|
4
|
+
- [d104fc9](https://github.com/appium/ruby_lib_core/commit/d104fc91e849dc183267ecd3a4074e9fa1c94a38) Tweak test cases for espresso (#181)
|
5
|
+
- [4e65bda](https://github.com/appium/ruby_lib_core/commit/4e65bdae1c044263a78fe715d63458d47707bd5a) add youiengine to leave a log in create session
|
6
|
+
- [acef11c](https://github.com/appium/ruby_lib_core/commit/acef11c37666abca7da93a6e613a92307fad4fd4) tweak yardoc format
|
7
|
+
|
8
|
+
|
1
9
|
#### v2.3.0 2019-01-07
|
2
10
|
|
3
11
|
- [b1b66a4](https://github.com/appium/ruby_lib_core/commit/b1b66a4745b8769bdcd860d7489326933bce5ff6) Release 2.3.0
|
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: 2.3.
|
4
|
+
version: 2.3.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: 2019-01-
|
11
|
+
date: 2019-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|