appium_lib 9.2.0 → 9.3.0
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 +26 -0
- data/android_tests/lib/android/specs/common/device_touchaction.rb +1 -1
- data/android_tests/lib/android/specs/device/touch_actions.rb +40 -1
- data/android_tests/lib/android/specs/driver.rb +3 -1
- data/appium_lib.gemspec +1 -0
- data/docs/android_docs.md +361 -231
- data/docs/ios_docs.md +391 -251
- data/ios_tests/appium.txt +3 -1
- data/ios_tests/lib/ios/specs/common/helper.rb +1 -1
- data/ios_tests/lib/ios/specs/device/device.rb +1 -1
- data/ios_tests/lib/ios/specs/device/touch_actions.rb +53 -1
- data/ios_tests/lib/ios/specs/driver.rb +3 -1
- data/ios_tests/lib/ios/specs/ios/element/button.rb +1 -2
- data/ios_tests/lib/ios/specs/ios/element/text.rb +2 -2
- data/ios_tests/lib/ios/specs/ios/element/textfield.rb +3 -1
- data/ios_tests/lib/ios/specs/ios/patch.rb +1 -6
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/common/wait.rb +6 -6
- data/lib/appium_lib/device/device.rb +53 -49
- data/lib/appium_lib/device/multi_touch.rb +99 -27
- data/lib/appium_lib/device/touch_actions.rb +38 -20
- data/lib/appium_lib/driver.rb +58 -24
- data/lib/appium_lib/ios/element/button.rb +6 -6
- data/lib/appium_lib/ios/element/generic.rb +30 -10
- data/lib/appium_lib/ios/element/text.rb +8 -8
- data/lib/appium_lib/ios/element/textfield.rb +9 -6
- data/lib/appium_lib/ios/helper.rb +17 -18
- data/release_notes.md +15 -0
- metadata +22 -2
@@ -165,7 +165,7 @@ module Appium
|
|
165
165
|
end
|
166
166
|
|
167
167
|
# Gets the JSON source of window number
|
168
|
-
# @param
|
168
|
+
# @param [Integer] _window_number The int index of the target window
|
169
169
|
# @return [JSON]
|
170
170
|
def source_window(_window_number = 0)
|
171
171
|
# TODO: update comments
|
@@ -229,17 +229,18 @@ module Appium
|
|
229
229
|
def string_attr_exact(class_name, attr, value)
|
230
230
|
if automation_name_is_xcuitest?
|
231
231
|
if attr == '*'
|
232
|
-
%((//#{class_name})[@*[.=
|
232
|
+
%((//#{class_name})[@*[.="#{value}"]])
|
233
233
|
else
|
234
|
-
%((//#{class_name})[@#{attr}=
|
234
|
+
%((//#{class_name})[@#{attr}="#{value}"])
|
235
235
|
end
|
236
236
|
else
|
237
|
-
%(//#{class_name}[@visible="true" and @#{attr}=
|
237
|
+
%(//#{class_name}[@visible="true" and @#{attr}="#{value}"])
|
238
238
|
end
|
239
239
|
end
|
240
240
|
|
241
241
|
# Find the first element exactly matching class and attribute value.
|
242
242
|
# Note: Uses XPath
|
243
|
+
# Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
|
243
244
|
# @param class_name [String] the class name to search for
|
244
245
|
# @param attr [String] the attribute to inspect
|
245
246
|
# @param value [String] the expected value of the attribute
|
@@ -250,6 +251,7 @@ module Appium
|
|
250
251
|
|
251
252
|
# Find all elements exactly matching class and attribute value.
|
252
253
|
# Note: Uses XPath
|
254
|
+
# Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
|
253
255
|
# @param class_name [String] the class name to match
|
254
256
|
# @param attr [String] the attribute to compare
|
255
257
|
# @param value [String] the value of the attribute that the element must have
|
@@ -262,12 +264,12 @@ module Appium
|
|
262
264
|
def string_attr_include(class_name, attr, value)
|
263
265
|
if automation_name_is_xcuitest?
|
264
266
|
if attr == '*'
|
265
|
-
%((//#{class_name})[@*[contains(translate(.,
|
267
|
+
%((//#{class_name})[@*[contains(translate(., "#{value.upcase}", "#{value}"), "#{value}")]])
|
266
268
|
else
|
267
|
-
%((//#{class_name})[contains(translate(@#{attr},
|
269
|
+
%((//#{class_name})[contains(translate(@#{attr}, "#{value.upcase}", "#{value}"), "#{value}")])
|
268
270
|
end
|
269
271
|
else
|
270
|
-
%(//#{class_name}[@visible="true" and contains(translate(@#{attr},
|
272
|
+
%(//#{class_name}[@visible="true" and contains(translate(@#{attr},"#{value.upcase}", "#{value}"), "#{value}")])
|
271
273
|
end
|
272
274
|
end
|
273
275
|
|
@@ -295,11 +297,7 @@ module Appium
|
|
295
297
|
# @param class_name [String] the tag to match
|
296
298
|
# @return [Element]
|
297
299
|
def first_ele(class_name)
|
298
|
-
|
299
|
-
@driver.find_element :class, class_name
|
300
|
-
else
|
301
|
-
ele_index class_name, 1
|
302
|
-
end
|
300
|
+
ele_index class_name, 1
|
303
301
|
end
|
304
302
|
|
305
303
|
# Get the last tag that matches class_name
|
@@ -307,21 +305,21 @@ module Appium
|
|
307
305
|
# @return [Element]
|
308
306
|
def last_ele(class_name)
|
309
307
|
if automation_name_is_xcuitest?
|
310
|
-
|
311
|
-
raise _no_such_element if
|
312
|
-
|
308
|
+
visible_elements = tags class_name
|
309
|
+
raise _no_such_element if visible_elements.empty?
|
310
|
+
visible_elements.last
|
313
311
|
else
|
314
312
|
ele_index class_name, 'last()'
|
315
313
|
end
|
316
314
|
end
|
317
315
|
|
318
|
-
# Returns the first visible element matching class_name
|
316
|
+
# Returns the first **visible** element matching class_name
|
319
317
|
#
|
320
318
|
# @param class_name [String] the class_name to search for
|
321
319
|
# @return [Element]
|
322
320
|
def tag(class_name)
|
323
321
|
if automation_name_is_xcuitest?
|
324
|
-
|
322
|
+
raise_error_if_no_element tags(class_name).first
|
325
323
|
else
|
326
324
|
ele_by_json(typeArray: [class_name], onlyVisible: true)
|
327
325
|
end
|
@@ -333,7 +331,8 @@ module Appium
|
|
333
331
|
# @return [Element]
|
334
332
|
def tags(class_name)
|
335
333
|
if automation_name_is_xcuitest?
|
336
|
-
@driver.find_elements :class, class_name
|
334
|
+
elements = @driver.find_elements :class, class_name
|
335
|
+
select_visible_elements elements
|
337
336
|
else
|
338
337
|
eles_by_json(typeArray: [class_name], onlyVisible: true)
|
339
338
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
#### v9.2.0 2017-01-09
|
2
|
+
|
3
|
+
- [958ae3e](https://github.com/appium/ruby_lib/commit/958ae3e2fc84b78191baf22e967c8a2fb7eded22) Release 9 2 0 (#460)
|
4
|
+
- [292acdf](https://github.com/appium/ruby_lib/commit/292acdf323e7725ef6cc09f2c56d94a8f54ec801) update changelog for 9.2.0 (#458)
|
5
|
+
- [1457728](https://github.com/appium/ruby_lib/commit/1457728872214746d9792d916a262a5f996e78ef) Remove last waits (#456)
|
6
|
+
- [b10cf83](https://github.com/appium/ruby_lib/commit/b10cf837edafea96e2b2d13e7adf6a87dd448723) add examples for predicate (#455)
|
7
|
+
- [d050100](https://github.com/appium/ruby_lib/commit/d050100c0f461c639c417f64ec12d569c412bfb6) Add some documents (#454)
|
8
|
+
- [6ee434f](https://github.com/appium/ruby_lib/commit/6ee434f9dbabb7bdb775692382972731c39a71c9) set auomation name from server if client side is nil (#451)
|
9
|
+
- [6abb146](https://github.com/appium/ruby_lib/commit/6abb14627fc454684ad4766d9dd95dfd4b52d564) add link to locatorStrategies (#449)
|
10
|
+
- [74dc747](https://github.com/appium/ruby_lib/commit/74dc747f56fe78f2bd883c1070d2ea25af0fa382) add changelog (#448)
|
11
|
+
- [4e8a449](https://github.com/appium/ruby_lib/commit/4e8a449bf2ff5a3e6f778389b336ecd1a712c25f) arrange a bit (#446)
|
12
|
+
- [4efeefa](https://github.com/appium/ruby_lib/commit/4efeefa7e3cb751dcc11280e26169e4ba57b3065) Release 9 1 3 (#445)
|
13
|
+
- [ba2fbdc](https://github.com/appium/ruby_lib/commit/ba2fbdcb206609259134fc09eac7940c21cc2c13) Release 9.1.3
|
14
|
+
|
15
|
+
|
1
16
|
#### v9.1.3 2017-01-04
|
2
17
|
|
3
18
|
- [ba2fbdc](https://github.com/appium/ruby_lib/commit/ba2fbdcb206609259134fc09eac7940c21cc2c13) Release 9.1.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -196,6 +196,26 @@ dependencies:
|
|
196
196
|
- - "~>"
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: 0.46.0
|
199
|
+
- !ruby/object:Gem::Dependency
|
200
|
+
name: rainbow
|
201
|
+
requirement: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 2.1.0
|
206
|
+
- - "<"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 2.2.0
|
209
|
+
type: :development
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 2.1.0
|
216
|
+
- - "<"
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 2.2.0
|
199
219
|
description: Ruby library for Appium.
|
200
220
|
email:
|
201
221
|
- code@bootstraponline.com
|