appium_lib 0.10.0 → 0.11.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/docs/android_docs.md +123 -116
- data/docs/ios_docs.md +126 -118
- data/lib/appium_lib/android/helper.rb +8 -3
- data/lib/appium_lib/common/element/text.rb +14 -0
- data/lib/appium_lib/common/helper.rb +18 -2
- data/lib/appium_lib/common/version.rb +2 -2
- data/release_notes.md +11 -0
- metadata +2 -2
@@ -24,6 +24,8 @@ module Appium::Android
|
|
24
24
|
prefix 'AbsSpinner'
|
25
25
|
when 'absolute'
|
26
26
|
prefix 'AbsoluteLayout'
|
27
|
+
when 'adapterview'
|
28
|
+
prefix 'AdapterView'
|
27
29
|
when 'adapterviewanimator'
|
28
30
|
prefix 'AdapterViewAnimator'
|
29
31
|
when 'adapterviewflipper'
|
@@ -156,6 +158,8 @@ module Appium::Android
|
|
156
158
|
prefix 'ToggleButton'
|
157
159
|
when 'twolinelistitem'
|
158
160
|
prefix 'TwoLineListItem'
|
161
|
+
when 'view'
|
162
|
+
'android.view.View'
|
159
163
|
when 'video'
|
160
164
|
prefix 'VideoView'
|
161
165
|
when 'viewanimator'
|
@@ -292,12 +296,13 @@ module Appium::Android
|
|
292
296
|
json = get_source
|
293
297
|
run_internal.call json['hierarchy']
|
294
298
|
|
295
|
-
res =
|
299
|
+
res = []
|
296
300
|
r = r.sort
|
297
301
|
r.uniq.each do |ele|
|
298
|
-
res
|
302
|
+
res.push "#{r.count(ele)}x #{ele}\n"
|
299
303
|
end
|
300
|
-
|
304
|
+
count_sort = ->(one,two) { two.match(/(\d+)x/)[1].to_i <=> one.match(/(\d+)x/)[1].to_i }
|
305
|
+
res.sort(&count_sort).join ''
|
301
306
|
end
|
302
307
|
|
303
308
|
# Count all classes on screen and print to stdout.
|
@@ -35,10 +35,24 @@ module Appium::Common
|
|
35
35
|
find_ele_by_text_include :text, text
|
36
36
|
end
|
37
37
|
|
38
|
+
# Get all static textfields that include text.
|
39
|
+
# @param text [String] the text to find.
|
40
|
+
# @return [Array<Text>]
|
41
|
+
def s_texts text
|
42
|
+
find_eles_by_text_include :text, text
|
43
|
+
end
|
44
|
+
|
38
45
|
# Get the first textfield that matches text.
|
39
46
|
# @param text [String] the text that the tag must match
|
40
47
|
# @return [Text]
|
41
48
|
def s_text_exact text
|
42
49
|
find_ele_by_text :text, text
|
43
50
|
end
|
51
|
+
|
52
|
+
# Get all static textfields that matches text.
|
53
|
+
# @param text [String] the text that the tag must match
|
54
|
+
# @return [Array<Text>]
|
55
|
+
def s_texts_exact text
|
56
|
+
find_eles_by_text :text, text
|
57
|
+
end
|
44
58
|
end # module Appium::Common
|
@@ -30,7 +30,15 @@ module Appium::Common
|
|
30
30
|
# @param interval [Float] the time in seconds to wait after calling the block
|
31
31
|
# @param block [Block] the block to call
|
32
32
|
# @return [Object] the result of block.call
|
33
|
-
def wait max_wait
|
33
|
+
def wait max_wait=-1, interval=0.5, &block
|
34
|
+
if max_wait == -1
|
35
|
+
max_wait = begin
|
36
|
+
$driver.default_wait
|
37
|
+
rescue
|
38
|
+
end
|
39
|
+
max_wait ||= 30
|
40
|
+
end
|
41
|
+
|
34
42
|
# Rescue Timeout::Error: execution expired
|
35
43
|
result = nil
|
36
44
|
timeout max_wait do
|
@@ -52,7 +60,15 @@ module Appium::Common
|
|
52
60
|
# @param interval [Float] the time in seconds to wait after calling the block
|
53
61
|
# @param block [Block] the block to call
|
54
62
|
# @return [Object] the result of block.call
|
55
|
-
def wait_true max_wait
|
63
|
+
def wait_true max_wait=-1, interval=0.5, &block
|
64
|
+
if max_wait == -1
|
65
|
+
max_wait = begin
|
66
|
+
$driver.default_wait
|
67
|
+
rescue
|
68
|
+
end
|
69
|
+
max_wait ||= 30
|
70
|
+
end
|
71
|
+
|
56
72
|
# Rescue Timeout::Error: execution expired
|
57
73
|
result = nil
|
58
74
|
timeout max_wait do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
module Appium
|
3
3
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
4
|
-
VERSION = '0.
|
5
|
-
DATE = '2013-09-
|
4
|
+
VERSION = '0.11.0' unless defined? ::Appium::VERSION
|
5
|
+
DATE = '2013-09-24' unless defined? ::Appium::DATE
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
#### v0.10.0 2013-09-20
|
2
|
+
|
3
|
+
- [6ab8180](https://github.com/appium/ruby_lib/commit/6ab8180ca332239793c0abc5ee3a31b0b081b6c4) Release 0.10.0
|
4
|
+
- [afb0b09](https://github.com/appium/ruby_lib/commit/afb0b09b54682fd497857a41affcdca531eb6911) Add promote_singleton_appium_methods(main_module)
|
5
|
+
- [631c584](https://github.com/appium/ruby_lib/commit/631c5846373031a16cacb18bc0259663bd64b7b7) .location_rel now returns a fraction
|
6
|
+
- [bf45140](https://github.com/appium/ruby_lib/commit/bf451407454853873305e25f7026e97a4119694d) page on iOS now takes window number
|
7
|
+
- [cb38755](https://github.com/appium/ruby_lib/commit/cb38755ec824e139b40cf291eb0d3421cca3dfad) Fix Android fast duration
|
8
|
+
- [c81bba8](https://github.com/appium/ruby_lib/commit/c81bba81bdba9a184b2fcc50fa1aabfdafd19e96) Sauce doesn't use dashes in the session id
|
9
|
+
- [613c33e](https://github.com/appium/ruby_lib/commit/613c33ee22b389a3c42d96cb618a9858a6bc2e88) Add note about xpath index
|
10
|
+
|
11
|
+
|
1
12
|
#### v0.9.1 2013-09-19
|
2
13
|
|
3
14
|
- [cd9fc63](https://github.com/appium/ruby_lib/commit/cd9fc636c5fc1071ad95ea08a7ab5c077737e6a7) Release 0.9.1
|
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: 0.
|
4
|
+
version: 0.11.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: 2013-09-
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|