appium_lib_core 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74fc275d3ef71bc5054e00398bb2b6b0ef2f0fd9a224585a430387c4115dbe8e
4
- data.tar.gz: 226d7e027e27c2bf6c31338b59d6ab2236a2286c99074f268db04cdf9efd4ed0
3
+ metadata.gz: 91975441ea499aa0c73a79ed638fad0b1e36bece63158e0c73664f9e11a12cfe
4
+ data.tar.gz: 01c0a38916ff1cde9d8b364562230a833ec5cd5850d3f5e1fb9823d924d0f6e1
5
5
  SHA512:
6
- metadata.gz: 497e195f39137ddc96f281531925217035a45c4f690b5a8563f0824e02207e8b3358d0ed68a54d651128a340129342c7a44c3af73a7851d49418bb0af315736e
7
- data.tar.gz: deb950ad6690aec113e83d87cc03a69f9c3e1aacbae7a94dbd568bc97f996f338bb170fd8736a82acbe960b86eeb36a82fe46d08921392408d2a7dec46cabf0c
6
+ metadata.gz: cbe0ce44e4c9c8b80479563147487b5b8dc5b0ec1310d35c80279c71c41118418bd1101fe332e42b58533816be2aa2614eed960a6fcc3349bad1c93f8b3d537b
7
+ data.tar.gz: a0946b815c5df44344fd6f337b2c6612be267c35c0e63752bdd2ea6fab1c27eba34cef37c97242587093a4dff2617875c061d440a63c08959752bcf921ae0534
@@ -10,6 +10,16 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [3.1.2] - 2019-05-10
14
+
15
+ ### Enhancements
16
+ - Add `sessions` command to get all available sessions on the Appium server
17
+ - [internal] Tweak error messages in emulator module
18
+
19
+ ### Bug fixes
20
+
21
+ ### Deprecations
22
+
13
23
  ## [3.1.1] - 2019-04-26
14
24
 
15
25
  ### Enhancements
@@ -11,10 +11,10 @@ variables:
11
11
  steps:
12
12
  - task: UseRubyVersion@0
13
13
  inputs:
14
- versionSpec: '>= 2.5'
14
+ versionSpec: '2.4.3'
15
15
 
16
- - script: gem install bundler
17
- displayName: 'Install bundler'
16
+ - script: gem install bundler ffi:1.10.0
17
+ displayName: 'Gem install bundler and ffi for Windows environment'
18
18
 
19
19
  - script: bundle install --retry=3 --jobs=4
20
20
  displayName: 'Call bundle install'
@@ -22,5 +22,5 @@ steps:
22
22
  - script: gem uninstall --force eventmachine && gem install eventmachine --platform ruby
23
23
  displayName: 'bundle re-install eventmachine for Windows because of Windows environment issue'
24
24
 
25
- - script: bundle exec parallel_test test/unit/ -n 4
26
- displayName: 'bundle exec parallel_test test/unit/ -n 4'
25
+ - script: parallel_test test/unit/ -n 4
26
+ displayName: 'Run parallel_test test/unit/ -n 4'
@@ -131,7 +131,7 @@ module Appium
131
131
 
132
132
  ::Appium::Core::Device.add_endpoint_method(:gsm_signal) do
133
133
  def gsm_signal(signal_strength)
134
- raise "#{signal_strength} should be member of #{GSM_SIGNALS} " if GSM_SIGNALS[signal_strength.to_sym].nil?
134
+ raise "#{signal_strength} should be member of #{GSM_SIGNALS.keys} " if GSM_SIGNALS[signal_strength.to_sym].nil?
135
135
 
136
136
  execute(:gsm_signal, {}, { signalStrength: GSM_SIGNALS[signal_strength],
137
137
  signalStrengh: GSM_SIGNALS[signal_strength] })
@@ -158,7 +158,9 @@ module Appium
158
158
 
159
159
  ::Appium::Core::Device.add_endpoint_method(:set_power_capacity) do
160
160
  def set_power_capacity(percent)
161
- raise "The percent should be between 0 and 100. Not #{percent}." unless (0..100).member? percent
161
+ unless (0..100).member? percent
162
+ ::Appium::Logger.warn "The percent should be between 0 and 100. Not #{percent}."
163
+ end
162
164
 
163
165
  execute(:set_power_capacity, {}, { percent: percent })
164
166
  end
@@ -36,6 +36,11 @@ module Appium
36
36
  ::Appium::Core::Commands::MJSONWP::COMMANDS[command]
37
37
  end
38
38
 
39
+ # Returns all available sessions on the Appium server instance
40
+ def sessions
41
+ execute :get_all_sessions
42
+ end
43
+
39
44
  def take_element_screenshot(element)
40
45
  execute :take_element_screenshot, id: element.ref
41
46
  end
@@ -36,6 +36,11 @@ module Appium
36
36
  ::Appium::Core::Commands::W3C::COMMANDS[command]
37
37
  end
38
38
 
39
+ # Returns all available sessions on the Appium server instance
40
+ def sessions
41
+ execute :get_all_sessions
42
+ end
43
+
39
44
  # Perform touch actions for W3C module.
40
45
  # Generate `touch` pointer action here and users can use this via `driver.action`
41
46
  # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/W3CActionBuilder.html
@@ -952,6 +952,18 @@ module Appium
952
952
  @bridge.session_capabilities
953
953
  end
954
954
 
955
+ # Returns available sessions on the Appium server
956
+ #
957
+ # @return [[Hash]]
958
+ #
959
+ # @example
960
+ #
961
+ # @driver.sessions #=> [{'id' => 'c363add8-a7ca-4455-b9e3-9ac4d69e95b3', 'capabilities' => { capabilities as Hash }}]
962
+ #
963
+ def sessions
964
+ @bridge.sessions
965
+ end
966
+
955
967
  # Image Comparison
956
968
  def match_images_features(first_image:,
957
969
  second_image:,
@@ -20,6 +20,7 @@ module Appium
20
20
  # Some commands differ for each driver.
21
21
  COMMAND = {
22
22
  # common
23
+ get_all_sessions: [:get, 'sessions'],
23
24
  available_contexts: [:get, 'session/:session_id/contexts'],
24
25
  set_context: [:post, 'session/:session_id/context'],
25
26
  current_context: [:get, 'session/:session_id/context'],
@@ -40,9 +40,7 @@ module Appium
40
40
  :stop_recording_screen, :stop_and_save_recording_screen,
41
41
  :shake, :device_time,
42
42
  :touch_actions, :multi_touch
43
- ].each do |key|
44
- delegate_from_appium_driver key
45
- end
43
+ ].each(&method(:delegate_from_appium_driver))
46
44
  end
47
45
 
48
46
  # def extended
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '3.1.1' unless defined? ::Appium::Core::VERSION
18
- DATE = '2019-04-26' unless defined? ::Appium::Core::DATE
17
+ VERSION = '3.1.2' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2019-05-10' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -1,3 +1,14 @@
1
+ #### v3.1.2 2019-05-10
2
+
3
+ - [ba2e889](https://github.com/appium/ruby_lib_core/commit/ba2e889434a7405d5caac2adec08536cb6c07415) Release 3.1.2
4
+ - [9479f26](https://github.com/appium/ruby_lib_core/commit/9479f26e716dcd65eddd51cd6139acaadd5aa361) add get sessions (#208)
5
+ - [48a53f2](https://github.com/appium/ruby_lib_core/commit/48a53f2689fa0ee4ec7b54b8eda063d59278d51a) Add test wda attachment (#207)
6
+ - [2d8a8f3](https://github.com/appium/ruby_lib_core/commit/2d8a8f3433f6774a1cc2d76028269ca006ca5273) tweak unit test
7
+ - [b936d01](https://github.com/appium/ruby_lib_core/commit/b936d014c1ba2babd79e860df41a2beb8fa22d8d) tweak error messages in emulator module
8
+ - [a17be27](https://github.com/appium/ruby_lib_core/commit/a17be27a008dc142e32b3bf745c262be15b1c940) install ffi in Azure env (#206)
9
+ - [2ef736a](https://github.com/appium/ruby_lib_core/commit/2ef736a63e86130db819abeef420a82cadca459f) follow method reference
10
+
11
+
1
12
  #### v3.1.1 2019-04-26
2
13
 
3
14
  - [10ebb89](https://github.com/appium/ruby_lib_core/commit/10ebb89716b641293f69d75213c6408a8605b4f9) Release 3.1.1
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: 3.1.1
4
+ version: 3.1.2
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-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver