appium_lib_core 1.2.2 → 1.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f05eb4862cc7d351acbf86c01a3cbd3256500885
4
- data.tar.gz: 05a3ecda36ab90e9f21c8633d49b922ff52d10e1
3
+ metadata.gz: 92864805498c13b3e41df7d6b5ef4fc5965fee0d
4
+ data.tar.gz: a911e896fc8fcb342eb8af36e43ee2ba341e2439
5
5
  SHA512:
6
- metadata.gz: 6ce9fbbeed16a6c1e07826f2a07f3f581f3c0506dbae734e74a4314a8c8e87342a5334b8ebffc6d74d96eb4d1c7e6d1378542adf85115f59e5e99be52d138a62
7
- data.tar.gz: 142b7d12043c528617e82146602293ebef36292604ff4ad678a4914cc8d1a04e94a08a052bd5974957906b681278ba55501f017a4b8a3ddeff82b4e29ab6671f
6
+ metadata.gz: bbc2bceb05631b3b7ee85e5ddccf50bb763e9223cf9a83f2c3653a69250f8da45c20f7ae308f8779c11653a99d58f41fa4fc1ec1b1f611856397a78cbb818455
7
+ data.tar.gz: 01a3830df3812f6b0a71f9493ccd18a22dfd0447858978d1f464fa285df75c12e5055d31341c0f2a38f9573dcea2effef409bc2fbe7298f08fa1a58ade694cc7
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  ### Enhancements
6
6
 
7
7
  ### Bug fixes
8
+ - Fix some w3c methods to work with Appium part 2 [#38](https://github.com/appium/ruby_lib_core/pull/38)
9
+
10
+ ### Deprecations
11
+
12
+ ## [1.2.3] - 2017-12-27
13
+ ### Enhancements
14
+
15
+ ### Bug fixes
16
+ - Fix some w3c methods to work with Appium part 2 [#38](https://github.com/appium/ruby_lib_core/pull/38)
8
17
 
9
18
  ### Deprecations
10
19
 
@@ -16,6 +16,7 @@ module Appium
16
16
  # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/KeyActions.html
17
17
  #
18
18
  # @private
19
+ # For Appium
19
20
  # override
20
21
  #
21
22
  # @example
@@ -31,6 +32,7 @@ module Appium
31
32
  end
32
33
  alias actions action
33
34
 
35
+ # For Appium
34
36
  # override
35
37
  def page_source
36
38
  # For W3C
@@ -40,6 +42,7 @@ module Appium
40
42
  execute :get_page_source
41
43
  end
42
44
 
45
+ # For Appium
43
46
  # override
44
47
  def element_attribute(element, name)
45
48
  # For W3C
@@ -47,6 +50,7 @@ module Appium
47
50
  execute :get_element_attribute, id: element.ref, name: name
48
51
  end
49
52
 
53
+ # For Appium
50
54
  # override
51
55
  def find_element_by(how, what, parent = nil)
52
56
  how, what = convert_locators(how, what)
@@ -59,6 +63,7 @@ module Appium
59
63
  ::Selenium::WebDriver::Element.new self, element_id_from(id)
60
64
  end
61
65
 
66
+ # For Appium
62
67
  # override
63
68
  def find_elements_by(how, what, parent = nil)
64
69
  how, what = convert_locators(how, what)
@@ -72,6 +77,32 @@ module Appium
72
77
  ids.map { |id| ::Selenium::WebDriver::Element.new self, element_id_from(id) }
73
78
  end
74
79
 
80
+ # For Appium
81
+ # override
82
+ def location
83
+ obj = execute(:get_location) || {}
84
+ Location.new obj['latitude'], obj['longitude'], obj['altitude']
85
+ end
86
+
87
+ # For Appium
88
+ # override
89
+ def set_location(lat, lon, alt)
90
+ loc = { latitude: lat, longitude: lon, altitude: alt }
91
+ execute :set_location, {}, { location: loc }
92
+ end
93
+
94
+ # For Appium
95
+ # override
96
+ def network_connection
97
+ execute :get_network_connection
98
+ end
99
+
100
+ # For Appium
101
+ # override
102
+ def network_connection=(type)
103
+ execute :set_network_connection, {}, { parameters: { type: type } }
104
+ end
105
+
75
106
  private
76
107
 
77
108
  # Don't convert locators for Appium Client
@@ -89,6 +89,17 @@ 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
+ ## Add to W3C commands
93
+ # rotatable
94
+ get_screen_orientation: [:get, 'session/:session_id/orientation'.freeze],
95
+ set_screen_orientation: [:post, 'session/:session_id/orientation'.freeze],
96
+
97
+ get_location: [:get, 'session/:session_id/location'.freeze],
98
+ set_location: [:post, 'session/:session_id/location'.freeze],
99
+
100
+ get_network_connection: [:get, 'session/:session_id/network_connection'.freeze],
101
+ set_network_connection: [:post, 'session/:session_id/network_connection'.freeze],
102
+
92
103
  # For IME
93
104
  ime_get_available_engines: [:get, 'session/:session_id/ime/available_engines'.freeze],
94
105
  ime_get_active_engine: [:get, 'session/:session_id/ime/active_engine'.freeze],
@@ -1,6 +1,6 @@
1
1
  module Appium
2
2
  module Core
3
- VERSION = '1.2.2'.freeze unless defined? ::Appium::Core::VERSION
4
- DATE = '2017-12-25'.freeze unless defined? ::Appium::Core::DATE
3
+ VERSION = '1.2.3'.freeze unless defined? ::Appium::Core::VERSION
4
+ DATE = '2017-12-27'.freeze unless defined? ::Appium::Core::DATE
5
5
  end
6
6
  end
@@ -1,3 +1,9 @@
1
+ #### v1.2.3 2017-12-27
2
+
3
+ - [26b8392](https://github.com/appium/ruby_lib_core/commit/26b83923a50257922030c7ccb83e110aff55eee5) Release 1.2.3
4
+ - [297bf22](https://github.com/appium/ruby_lib_core/commit/297bf22d7c3b0e96a3ed25f7ea62bb19cf6bd277) add some oss commands to w3c module(#38)
5
+
6
+
1
7
  #### v1.2.2 2017-12-25
2
8
 
3
9
  - [9e7a971](https://github.com/appium/ruby_lib_core/commit/9e7a971ae35aefd471ee07faae8c0f78fb9b0ae2) Release 1.2.2
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.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-25 00:00:00.000000000 Z
11
+ date: 2017-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver