appium_lib 0.5.1 → 0.5.2
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 +8 -8
- data/docs/android_docs.md +96 -96
- data/docs/ios_docs.md +98 -98
- data/lib/appium_lib/android/helper.rb +163 -12
- data/lib/appium_lib/common/version.rb +1 -1
- data/release_notes.md +6 -0
- metadata +1 -1
@@ -16,22 +16,168 @@ module Appium::Android
|
|
16
16
|
|
17
17
|
# must match names in AndroidElementClassMap (Appium's Java server)
|
18
18
|
case tag_name
|
19
|
+
when 'abslist'
|
20
|
+
prefix 'AbsListView'
|
21
|
+
when 'absseek'
|
22
|
+
prefix 'AbsSeekBar'
|
23
|
+
when 'absspinner'
|
24
|
+
prefix 'AbsSpinner'
|
25
|
+
when 'absolute'
|
26
|
+
prefix 'AbsoluteLayout'
|
27
|
+
when 'adapterviewanimator'
|
28
|
+
prefix 'AdapterViewAnimator'
|
29
|
+
when 'adapterviewflipper'
|
30
|
+
prefix 'AdapterViewFlipper'
|
31
|
+
when 'analogclock'
|
32
|
+
prefix 'AnalogClock'
|
33
|
+
when 'appwidgethost'
|
34
|
+
prefix 'AppWidgetHostView'
|
35
|
+
when 'autocomplete'
|
36
|
+
prefix 'AutoCompleteTextView'
|
19
37
|
when 'button'
|
20
38
|
prefix 'Button', 'ImageButton'
|
21
|
-
when '
|
22
|
-
prefix '
|
23
|
-
when '
|
24
|
-
prefix '
|
25
|
-
when '
|
39
|
+
when 'breadcrumbs'
|
40
|
+
prefix 'FragmentBreadCrumbs'
|
41
|
+
when 'calendar'
|
42
|
+
prefix 'CalendarView'
|
43
|
+
when 'checkbox'
|
44
|
+
prefix 'CheckBox'
|
45
|
+
when 'checked'
|
46
|
+
prefix 'CheckedTextView'
|
47
|
+
when 'chronometer'
|
48
|
+
prefix 'Chronometer'
|
49
|
+
when 'compound'
|
50
|
+
prefix 'CompoundButton'
|
51
|
+
when 'datepicker'
|
52
|
+
prefix 'DatePicker'
|
53
|
+
when 'dialerfilter'
|
54
|
+
prefix 'DialerFilter'
|
55
|
+
when 'digitalclock'
|
56
|
+
prefix 'DigitalClock'
|
57
|
+
when 'drawer'
|
58
|
+
prefix 'SlidingDrawer'
|
59
|
+
when 'expandable'
|
60
|
+
prefix 'ExpandableListView'
|
61
|
+
when 'extract'
|
62
|
+
prefix 'ExtractEditText'
|
63
|
+
when 'fragmenttabhost'
|
64
|
+
prefix 'FragmentTabHost'
|
65
|
+
when 'frame'
|
26
66
|
prefix 'FrameLayout'
|
67
|
+
when 'gallery'
|
68
|
+
prefix 'Gallery'
|
69
|
+
when 'gesture'
|
70
|
+
prefix 'GestureOverlayView'
|
71
|
+
when 'glsurface'
|
72
|
+
prefix 'GLSurfaceView'
|
27
73
|
when 'grid'
|
28
74
|
prefix 'GridView'
|
29
|
-
when '
|
30
|
-
prefix '
|
75
|
+
when 'gridlayout'
|
76
|
+
prefix 'GridLayout'
|
77
|
+
when 'horizontal'
|
78
|
+
prefix 'HorizontalScrollView'
|
79
|
+
when 'image'
|
80
|
+
prefix 'ImageView'
|
81
|
+
when 'imagebutton'
|
82
|
+
prefix 'ImageButton'
|
83
|
+
when 'imageswitcher'
|
84
|
+
prefix 'ImageSwitcher'
|
85
|
+
when 'keyboard'
|
86
|
+
prefix 'KeyboardView'
|
31
87
|
when 'linear'
|
32
88
|
prefix 'LinearLayout'
|
89
|
+
when 'list'
|
90
|
+
prefix 'ListView'
|
91
|
+
when 'media'
|
92
|
+
prefix 'MediaController'
|
93
|
+
when 'mediaroutebutton'
|
94
|
+
prefix 'MediaRouteButton'
|
95
|
+
when 'multiautocomplete'
|
96
|
+
prefix 'MultiAutoCompleteTextView'
|
97
|
+
when 'numberpicker'
|
98
|
+
prefix 'NumberPicker'
|
99
|
+
when 'pagetabstrip'
|
100
|
+
prefix 'PageTabStrip'
|
101
|
+
when 'pagetitlestrip'
|
102
|
+
prefix 'PageTitleStrip'
|
103
|
+
when 'progress'
|
104
|
+
prefix 'ProgressBar'
|
105
|
+
when 'quickcontactbadge'
|
106
|
+
prefix 'QuickContactBadge'
|
107
|
+
when 'radio'
|
108
|
+
prefix 'RadioButton'
|
109
|
+
when 'radiogroup'
|
110
|
+
prefix 'RadioGroup'
|
111
|
+
when 'rating'
|
112
|
+
prefix 'RatingBar'
|
113
|
+
when 'relative'
|
114
|
+
prefix 'RelativeLayout'
|
115
|
+
when 'row'
|
116
|
+
prefix 'TableRow'
|
117
|
+
when 'rssurface'
|
118
|
+
prefix 'RSSurfaceView'
|
119
|
+
when 'rstexture'
|
120
|
+
prefix 'RSTextureView'
|
121
|
+
when 'scroll'
|
122
|
+
prefix 'ScrollView'
|
123
|
+
when 'search'
|
124
|
+
prefix 'SearchView'
|
125
|
+
when 'seek'
|
126
|
+
prefix 'SeekBar'
|
127
|
+
when 'space'
|
128
|
+
prefix 'Space'
|
129
|
+
when 'spinner'
|
130
|
+
prefix 'Spinner'
|
131
|
+
when 'stack'
|
132
|
+
prefix 'StackView'
|
133
|
+
when 'surface'
|
134
|
+
prefix 'SurfaceView'
|
135
|
+
when 'switch'
|
136
|
+
prefix 'Switch'
|
137
|
+
when 'tabhost'
|
138
|
+
prefix 'TabHost'
|
139
|
+
when 'tabwidget'
|
140
|
+
prefix 'TabWidget'
|
141
|
+
when 'table'
|
142
|
+
prefix 'TableLayout'
|
143
|
+
when 'text'
|
144
|
+
prefix 'TextView'
|
145
|
+
when 'textclock'
|
146
|
+
prefix 'TextClock'
|
147
|
+
when 'textswitcher'
|
148
|
+
prefix 'TextSwitcher'
|
149
|
+
when 'texture'
|
150
|
+
prefix 'TextureView'
|
33
151
|
when 'textfield'
|
34
152
|
prefix 'EditText'
|
153
|
+
when 'timepicker'
|
154
|
+
prefix 'TimePicker'
|
155
|
+
when 'toggle'
|
156
|
+
prefix 'ToggleButton'
|
157
|
+
when 'twolinelistitem'
|
158
|
+
prefix 'TwoLineListItem'
|
159
|
+
when 'video'
|
160
|
+
prefix 'VideoView'
|
161
|
+
when 'viewanimator'
|
162
|
+
prefix 'ViewAnimator'
|
163
|
+
when 'viewflipper'
|
164
|
+
prefix 'ViewFlipper'
|
165
|
+
when 'viewgroup'
|
166
|
+
prefix 'ViewGroup'
|
167
|
+
when 'viewpager'
|
168
|
+
prefix 'ViewPager'
|
169
|
+
when 'viewstub'
|
170
|
+
prefix 'ViewStub'
|
171
|
+
when 'viewswitcher'
|
172
|
+
prefix 'ViewSwitcher'
|
173
|
+
when 'web'
|
174
|
+
prefix 'WebView'
|
175
|
+
when 'window'
|
176
|
+
prefix 'FrameLayout'
|
177
|
+
when 'zoom'
|
178
|
+
prefix 'ZoomButton'
|
179
|
+
when 'zoomcontrols'
|
180
|
+
prefix 'ZoomControls'
|
35
181
|
else
|
36
182
|
raise "Invalid tag name #{tag_name}"
|
37
183
|
end # return result of case
|
@@ -129,9 +275,7 @@ module Appium::Android
|
|
129
275
|
out
|
130
276
|
end
|
131
277
|
|
132
|
-
|
133
|
-
# Useful for appium_console.
|
134
|
-
def page_class
|
278
|
+
def get_page_class
|
135
279
|
r = []
|
136
280
|
run_internal = lambda do |node|
|
137
281
|
if node.kind_of? Array
|
@@ -148,11 +292,18 @@ module Appium::Android
|
|
148
292
|
json = get_source
|
149
293
|
run_internal.call json['hierarchy']
|
150
294
|
|
295
|
+
res = ''
|
151
296
|
r = r.sort
|
152
297
|
r.uniq.each do |ele|
|
153
|
-
|
154
|
-
puts "x #{ele}\n"
|
298
|
+
res += "#{r.count(ele)}x #{ele}\n"
|
155
299
|
end
|
300
|
+
res
|
301
|
+
end
|
302
|
+
|
303
|
+
# Count all classes on screen and print to stdout.
|
304
|
+
# Useful for appium_console.
|
305
|
+
def page_class
|
306
|
+
puts get_page_class
|
156
307
|
nil
|
157
308
|
end
|
158
309
|
|
@@ -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.
|
4
|
+
VERSION = '0.5.2' unless defined? ::Appium::VERSION
|
5
5
|
DATE = '2013-05-24' unless defined? ::Appium::DATE
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v0.5.1 2013-05-24
|
2
|
+
|
3
|
+
- [1a98819](https://github.com/appium/ruby_lib/commit/1a98819e93e739496f27a6ec2ad4197ca78c08a4) Release 0.5.1
|
4
|
+
- [2003589](https://github.com/appium/ruby_lib/commit/2003589197a78d54f3d177abbf2335724c090e1e) Fix names on Android
|
5
|
+
|
6
|
+
|
1
7
|
#### v0.5.0 2013-05-24
|
2
8
|
|
3
9
|
- [de58f71](https://github.com/appium/ruby_lib/commit/de58f7164230d7551df8462d65d0e43a3d0cfdab) Release 0.5.0
|