appium_lib 9.3.2 → 9.3.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/docs/android_docs.md +224 -224
- data/docs/ios_docs.md +278 -238
- data/ios_tests/lib/ios/specs/ios/helper.rb +17 -0
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/ios/helper.rb +40 -0
- data/release_notes.md +7 -0
- metadata +2 -2
@@ -30,4 +30,21 @@ describe 'ios/helper' do
|
|
30
30
|
t 'ios_version' do
|
31
31
|
ios_version.wont_be_empty
|
32
32
|
end
|
33
|
+
|
34
|
+
t 'tags_include' do
|
35
|
+
elements = tags_include class_names: %w(XCUIElementTypeTextView XCUIElementTypeStaticText)
|
36
|
+
elements.length.must_be 24
|
37
|
+
|
38
|
+
elements = tags_include class_names: %w(XCUIElementTypeTextView XCUIElementTypeStaticText), value: 'u'
|
39
|
+
elements.length.must_be 13
|
40
|
+
end
|
41
|
+
|
42
|
+
t 'tags_include' do
|
43
|
+
elements = tags_exact class_names: %w(XCUIElementTypeTextView XCUIElementTypeStaticText)
|
44
|
+
elements.length.must_be 24
|
45
|
+
|
46
|
+
elements = tags_exact class_names: %w(XCUIElementTypeTextView XCUIElementTypeStaticText), value: 'Buttons'
|
47
|
+
elements.length.must_be 1
|
48
|
+
elements.first.value.must_equal 'Buttons'
|
49
|
+
end
|
33
50
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Appium
|
2
2
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
3
|
-
VERSION = '9.3.
|
4
|
-
DATE = '2017-02-
|
3
|
+
VERSION = '9.3.3'.freeze unless defined? ::Appium::VERSION
|
4
|
+
DATE = '2017-02-18'.freeze unless defined? ::Appium::DATE
|
5
5
|
end
|
@@ -338,6 +338,46 @@ module Appium
|
|
338
338
|
end
|
339
339
|
end
|
340
340
|
|
341
|
+
# Returns all visible elements matching class_names and value
|
342
|
+
# This method calls find_element/s and element.value/text many times.
|
343
|
+
# So, if you set many class_names, this method's performance become worse.
|
344
|
+
#
|
345
|
+
# @param class_names [Array[String]] the class_names to search for
|
346
|
+
# @param value [String] the value to search for
|
347
|
+
# @return [Array[Element]]
|
348
|
+
def tags_include(class_names:, value: nil)
|
349
|
+
return unless class_names.is_a? Array
|
350
|
+
|
351
|
+
class_names.flat_map do |class_name|
|
352
|
+
if automation_name_is_xcuitest?
|
353
|
+
visible_elements = tags(class_name)
|
354
|
+
value ? elements_include(visible_elements, value) : visible_elements
|
355
|
+
else
|
356
|
+
value ? eles_by_json_visible_contains(class_name, value) : tags(class_name)
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
# Returns all visible elements matching class_names and value.
|
362
|
+
# This method calls find_element/s and element.value/text many times.
|
363
|
+
# So, if you set many class_names, this method's performance become worse.
|
364
|
+
#
|
365
|
+
# @param class_names [Array[String]] the class_names to search for
|
366
|
+
# @param value [String] the value to search for
|
367
|
+
# @return [Array[Element]]
|
368
|
+
def tags_exact(class_names:, value: nil)
|
369
|
+
return unless class_names.is_a? Array
|
370
|
+
|
371
|
+
class_names.flat_map do |class_name|
|
372
|
+
if automation_name_is_xcuitest?
|
373
|
+
visible_elements = tags(class_name)
|
374
|
+
value ? elements_exact(visible_elements, value) : visible_elements
|
375
|
+
else
|
376
|
+
value ? eles_by_json_visible_exact(class_name, value) : tags(class_name)
|
377
|
+
end
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
341
381
|
# @private
|
342
382
|
# Returns an object that matches the first element that contains value
|
343
383
|
#
|
data/release_notes.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
#### v9.3.2 2017-02-11
|
2
|
+
|
3
|
+
- [39fd66f](https://github.com/appium/ruby_lib/commit/39fd66f354b6fdd6bba7ae6f5e28f86dc301cdf9) Release 9 3 2 (#487)
|
4
|
+
- [7edcd09](https://github.com/appium/ruby_lib/commit/7edcd098be56c0ea72c4d33f91600009df1c1b88) Update changelog and add tests (#486)
|
5
|
+
- [5731059](https://github.com/appium/ruby_lib/commit/5731059766542b5a7615fff20644db42177586e4) allow SAUCE_ENDPOINT env var to override sauce server url/path (#485)
|
6
|
+
|
7
|
+
|
1
8
|
#### v9.3.1 2017-02-05
|
2
9
|
|
3
10
|
- [fa555d1](https://github.com/appium/ruby_lib/commit/fa555d10e7a5c48e4976fbbf2e9c061a5948d6bd) Release 9 3 1 (#484)
|
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.3.
|
4
|
+
version: 9.3.3
|
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-02-
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|