appium_console 0.3.5 → 0.3.6
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/Rakefile +13 -2
- data/appium_console.gemspec +3 -3
- data/lib/appium_console.rb +3 -0
- data/lib/appium_console/version.rb +2 -2
- data/osx.md +59 -27
- data/readme.md +3 -1
- data/release_notes.md +7 -7
- metadata +9 -9
- data/docs.md +0 -44
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2UxODYzM2E3MjQ1NmI3NzY0NDRhMzc1YjE1NGYzM2EzY2NjZWQ0NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmNkZmFjZWY5NTNmMzczZjJjMTRmODFhOTZmYjM4N2ZiYmY4OWVhZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2IyZDlmZTI3Y2I2ZGJiZjBjMTRhM2MxMjY2MTYyYjM4ZTk4MzhkNzM4MmFm
|
10
|
+
YmI0YzcyNmJmNjI2YjhlOTFiN2UwZGQyMWM1ODQ3MDRkN2JiNjA3ZDIwYzU5
|
11
|
+
YzkxZjhlMzljY2Y0ZjBiNjA5Njc5ODc0YjJhYTJkOWMzNmZjZTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjUyZDc4YjY4NGQzNTNkNjNiYjZiZDk2OWQ2MjA1MzI4Mzk2MGYyYTRhOGQw
|
14
|
+
OGI4ZmM4N2EyMjUyNWI0NDA4ZWU3N2ZiYjY3NWI1OTI5MjZkOTcyYzRjMDBh
|
15
|
+
MzFkMjgyZTM3YTc0ODc1MjUxMzkxYWI0ZTkyNzY2YmNjYTJjYjc=
|
data/Rakefile
CHANGED
@@ -95,13 +95,22 @@ end
|
|
95
95
|
|
96
96
|
desc 'Update release notes'
|
97
97
|
task :notes do
|
98
|
+
tag_sort = ->(tag1,tag2) do
|
99
|
+
tag1_numbers = tag1.match(/\.?v(\d+\.\d+\.\d+)$/)[1].split('.').map! { |n| n.to_i }
|
100
|
+
tag2_numbers = tag2.match(/\.?v(\d+\.\d+\.\d+)$/)[1].split('.').map! { |n| n.to_i }
|
101
|
+
tag1_numbers <=> tag2_numbers
|
102
|
+
end
|
103
|
+
|
98
104
|
tags = `git tag`.split "\n"
|
105
|
+
tags.sort! &tag_sort
|
99
106
|
pairs = []
|
100
107
|
tags.each_index { |a| pairs.push tags[a] + '...' + tags[a+1] unless tags[a+1].nil? }
|
101
108
|
|
102
109
|
notes = ''
|
103
110
|
|
104
111
|
dates = `git log --tags --simplify-by-decoration --pretty="format:%d %ad" --date=short`.split "\n"
|
112
|
+
|
113
|
+
pairs.sort! &tag_sort
|
105
114
|
pairs.reverse! # pairs are in reverse order.
|
106
115
|
|
107
116
|
tag_date = []
|
@@ -120,9 +129,11 @@ task :notes do
|
|
120
129
|
data =`git log --pretty=oneline #{pairs[a]}`
|
121
130
|
new_data = ''
|
122
131
|
data.split("\n").each do |line|
|
123
|
-
hex = line.match(/[a-zA-Z0-9]+/)[0]
|
132
|
+
hex = line.match(/[a-zA-Z0-9]+/)[0]
|
124
133
|
# use first 7 chars to match GitHub
|
125
|
-
|
134
|
+
comment = line.gsub(hex, '').strip
|
135
|
+
next if comment == 'Update release notes'
|
136
|
+
new_data += "- [#{hex[0...7]}](https://github.com/appium/#{gh_name}/commit/#{hex}) #{comment}\n"
|
126
137
|
end
|
127
138
|
data = new_data + "\n"
|
128
139
|
|
data/appium_console.gemspec
CHANGED
@@ -24,10 +24,10 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.require_paths = [ 'lib' ]
|
25
25
|
|
26
26
|
# appium_lib version must match ruby console version.
|
27
|
-
s.add_runtime_dependency 'appium_lib', '>= 0.3.
|
28
|
-
s.add_runtime_dependency 'pry', '~> 0.9.12'
|
27
|
+
s.add_runtime_dependency 'appium_lib', '>= 0.3.13'
|
28
|
+
s.add_runtime_dependency 'pry', '~> 0.9.12.2'
|
29
29
|
s.add_runtime_dependency 'toml', '~> 0.0.4'
|
30
|
-
s.add_development_dependency 'rake', '~> 10.0.
|
30
|
+
s.add_development_dependency 'rake', '~> 10.0.4'
|
31
31
|
|
32
32
|
s.executables = [ 'arc' ]
|
33
33
|
s.files = `git ls-files`.split "\n"
|
data/lib/appium_console.rb
CHANGED
@@ -39,6 +39,9 @@ module Appium::Console
|
|
39
39
|
env.update 'APP_PATH', 'APP_APK', 'APP_PACKAGE',
|
40
40
|
'APP_ACTIVITY', 'APP_WAIT_ACTIVITY',
|
41
41
|
'SELENDROID'
|
42
|
+
|
43
|
+
# Ensure app path is absolute
|
44
|
+
ENV['APP_PATH'] = File.expand_path ENV['APP_PATH'] if ENV['APP_PATH']
|
42
45
|
end
|
43
46
|
|
44
47
|
require 'appium_lib'
|
@@ -2,6 +2,6 @@
|
|
2
2
|
# Define Appium module so version can be required directly.
|
3
3
|
module Appium; end unless defined? Appium
|
4
4
|
module Appium::Console
|
5
|
-
VERSION = '0.3.
|
6
|
-
DATE = '2013-05-
|
5
|
+
VERSION = '0.3.6' unless defined? ::Appium::Console::VERSION
|
6
|
+
DATE = '2013-05-20' unless defined? ::Appium::Console::DATE
|
7
7
|
end
|
data/osx.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
#### Getting Started
|
2
2
|
|
3
|
-
This document is written for OS X.
|
4
|
-
Appium Android should run on Linux however iOS testing requires OS X.
|
3
|
+
This document is written for OS X 10.8.3 or better. iOS testing requires OS X. Android testing will work on OS X, Windows, or Linux.
|
5
4
|
|
6
|
-
|
5
|
+
Install `Xcode` from the Mac app store and the command line build tools (Xcode -> Preferences -> Downloads).
|
6
|
+
|
7
|
+
- Ensure you have Ruby 1.9.3-p392 or better (1.8 is not supported). Install the latest stable patch release of Ruby 1.9.3 (not Ruby 2.0).
|
7
8
|
|
8
9
|
`$ \curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3`
|
9
10
|
|
@@ -23,7 +24,8 @@ $ rvm --default use 1.9.3
|
|
23
24
|
```ruby
|
24
25
|
gem update --system ;\
|
25
26
|
gem install --no-rdoc --no-ri bundler ;\
|
26
|
-
gem update
|
27
|
+
gem update ;\
|
28
|
+
gem cleanup
|
27
29
|
```
|
28
30
|
|
29
31
|
- Install appium_console gem.
|
@@ -34,7 +36,15 @@ gem uninstall -aIx appium_console ;\
|
|
34
36
|
gem install --no-rdoc --no-ri appium_console
|
35
37
|
```
|
36
38
|
|
37
|
-
- Install [nodejs](http://nodejs.org/) using
|
39
|
+
- Install [nodejs](http://nodejs.org/) using brew.
|
40
|
+
|
41
|
+
```
|
42
|
+
brew update ;\
|
43
|
+
brew upgrade node ;\
|
44
|
+
brew install node
|
45
|
+
```
|
46
|
+
|
47
|
+
- Node should be `v0.10.2` or better.
|
38
48
|
Don't use the big green install button on nodejs.org or all npm commands will require sudo.
|
39
49
|
|
40
50
|
`$ node --version`
|
@@ -43,7 +53,7 @@ Don't use the big green install button on nodejs.org or all npm commands will re
|
|
43
53
|
|
44
54
|
- Install grunt.
|
45
55
|
|
46
|
-
`
|
56
|
+
`npm install -g grunt grunt-cli`
|
47
57
|
|
48
58
|
```bash
|
49
59
|
$ grunt --version
|
@@ -51,6 +61,16 @@ grunt-cli v0.1.6
|
|
51
61
|
grunt v0.4.1
|
52
62
|
```
|
53
63
|
|
64
|
+
- Install [ant](http://ant.apache.org/)
|
65
|
+
- Install [maven](http://maven.apache.org/download.cgi) if it's not already installed.
|
66
|
+
|
67
|
+
```
|
68
|
+
$ ant -version
|
69
|
+
Apache Ant(TM) version 1.8.2 compiled on June 20 2012
|
70
|
+
$ mvn -version
|
71
|
+
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
|
72
|
+
```
|
73
|
+
|
54
74
|
- Clone appium
|
55
75
|
|
56
76
|
`$ git clone git://github.com/appium/appium.git`
|
@@ -59,26 +79,46 @@ grunt v0.4.1
|
|
59
79
|
|
60
80
|
`cd appium; ./reset.sh`
|
61
81
|
|
62
|
-
|
82
|
+
If you see config errors, try cleaning git. `git clean -dfx; git reset --hard`
|
63
83
|
|
64
|
-
|
84
|
+
You can also reset by platform. `./reset.sh --android`
|
65
85
|
|
66
|
-
- Start appium.
|
86
|
+
- Start appium.
|
67
87
|
|
68
|
-
`node server.js
|
88
|
+
`node server.js`
|
69
89
|
|
70
|
-
- Install `Intel x86 Emulator Accelerator (HAXM)` under Extras using the `android`` tool.
|
71
|
-
- Use Intel [system image](http://software.intel.com/en-us/articles/android-4-2-jelly-bean-x86-emulator-system-image)
|
72
|
-
at least API 17 (Jelly Bean). This is also installed via the `android` tool.
|
73
90
|
|
74
|
-
|
75
|
-
|
91
|
+
# Bash Profile
|
92
|
+
- Add the Android SDK tools folder to your path so you can run `android`.
|
93
|
+
- Define the `ANDROID_HOME` env var pointing to SDK root. On OSX place it in `~/.bash_profile`
|
94
|
+
- You may have to add grunt as well `/usr/local/share/npm/bin/grunt`
|
95
|
+
|
96
|
+
```
|
97
|
+
# ~/.bash_profile
|
98
|
+
export ANDROID_HOME=$HOME/Downloads/android-sdk-macosx
|
99
|
+
export ANDROID_SDK=$ANDROID_HOME
|
100
|
+
PATH=$PATH:/Applications/apache-ant-1.8.4/bin
|
101
|
+
PATH=$PATH:/usr/local/share/npm/bin/
|
102
|
+
PATH=$PATH:$HOME/Downloads/android-sdk-macosx/platform-tools
|
103
|
+
PATH=$PATH:$HOME/Downloads/android-sdk-macosx/tools
|
104
|
+
export JAVA_HOME="`/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home`"
|
105
|
+
export APP_PATH="/path/to/MyiOS.app"
|
106
|
+
export APK_PATH="/path/to/my.apk"
|
107
|
+
export APP_PACKAGE="com.example.Package"
|
108
|
+
export APP_ACTIVITY="StartActivity"
|
109
|
+
export APP_WAIT_ACTIVITY="SplashActivity"
|
110
|
+
|
111
|
+
export PATH
|
112
|
+
```
|
76
113
|
|
77
|
-
`android`
|
114
|
+
- Run `android` to open the SDK manager.
|
115
|
+
- Install `Intel x86 Emulator Accelerator (HAXM)` under Extras
|
116
|
+
- Install API 17 `SDK Platform`, `Intel x86 Atom System Image`, `Google APIs` as in the picture.
|
117
|
+
If there are any problems viewing or downloading the packages, go to `Packages -> Reload` and try again.
|
78
118
|
|
79
119
|

|
80
120
|
|
81
|
-
- Create a new Android virtual device that uses the Intel image.
|
121
|
+
- Create a new Android virtual device that uses the Intel image. Ensure `Use Host GPU` is checked.
|
82
122
|
|
83
123
|
`android avd`
|
84
124
|
|
@@ -88,6 +128,8 @@ If there are any problems viewing or downloading the packages, go to `Packages -
|
|
88
128
|
|
89
129
|

|
90
130
|
|
131
|
+
- Launch the emulator with `emulator @t17`
|
132
|
+
|
91
133
|
- After launching the emulator, check that it's listed in adb devices. Run the following commands a few times until it's listed.
|
92
134
|
|
93
135
|
`adb kill-server; adb devices`
|
@@ -96,16 +138,6 @@ If you see `error: protocol fault (no status)` just keep running the command unt
|
|
96
138
|
|
97
139
|
- With both the Android emulator running and the Appium server started, it's time to launch the appium console. Make sure the ENV vars are exported.
|
98
140
|
|
99
|
-
APP_ACTIVITY is the activity to start the app with.
|
100
|
-
APP_WAIT_ACTIVITY is the activity to wait for before considering the app as having been started.
|
101
|
-
|
102
|
-
```
|
103
|
-
export APP_PATH="/path/to/my.apk" ;\
|
104
|
-
export APP_PACKAGE="com.my.Pkg" ;\
|
105
|
-
export APP_ACTIVITY="StartActivity"
|
106
|
-
export APP_WAIT_ACTIVITY="SplashActivity"
|
107
|
-
```
|
108
|
-
|
109
141
|
- Echo the values to make sure they're set correctly
|
110
142
|
|
111
143
|
`$ echo $APP_PATH $APP_PACKAGE $APP_ACTIVITY $APP_WAIT_ACTIVITY`
|
data/readme.md
CHANGED
@@ -79,4 +79,6 @@ Reset Appium after pulling the latest changes.
|
|
79
79
|
|
80
80
|
#### Documentation
|
81
81
|
|
82
|
-
|
82
|
+
- [Overview ](https://github.com/appium/ruby_lib/blob/master/docs/docs.md)
|
83
|
+
- [Android methods](https://github.com/appium/ruby_lib/blob/master/docs/android_docs.md)
|
84
|
+
- [iOS methods](https://github.com/appium/ruby_lib/blob/master/docs/ios_docs.md)
|
data/release_notes.md
CHANGED
@@ -1,21 +1,25 @@
|
|
1
|
+
#### v0.3.5 2013-05-06
|
2
|
+
|
3
|
+
- [b031b60](https://github.com/appium/ruby_console/commit/b031b60276b01e86a649cd8db8b250f3d52da9cc) Release 0.3.5
|
4
|
+
- [521639d](https://github.com/appium/ruby_console/commit/521639dc1b53371a472a40304c59e4476ab22197) Add selendroid
|
5
|
+
- [c5456d2](https://github.com/appium/ruby_console/commit/c5456d29d5a1aeed1f1226b90c69a7d0025ad224) Use --local install
|
6
|
+
|
7
|
+
|
1
8
|
#### v0.3.4 2013-04-26
|
2
9
|
|
3
10
|
- [2a621bb](https://github.com/appium/ruby_console/commit/2a621bb1620685577173fdf59daabca036cd30f7) Release 0.3.4
|
4
11
|
- [bd60857](https://github.com/appium/ruby_console/commit/bd60857f39bd17e454a10ad0658c01c20869c33a) Fix arc upgrade
|
5
|
-
- [2362c9c](https://github.com/appium/ruby_console/commit/2362c9ceb9c33f0086d476f11373115a08e5617b) Update release notes
|
6
12
|
|
7
13
|
|
8
14
|
#### v0.3.3 2013-04-26
|
9
15
|
|
10
16
|
- [a4cea5b](https://github.com/appium/ruby_console/commit/a4cea5b9857f5b450ade03cf3f326605b2aff040) Release 0.3.3
|
11
17
|
- [188503c](https://github.com/appium/ruby_console/commit/188503c0f1c884884408896a8351ab34823c5c69) Fix appium.txt support
|
12
|
-
- [cbc12db](https://github.com/appium/ruby_console/commit/cbc12dbfc5fffdcf6e3e53eb48c1d513add90726) Update release notes
|
13
18
|
|
14
19
|
|
15
20
|
#### v0.3.2 2013-04-26
|
16
21
|
|
17
22
|
- [521b85e](https://github.com/appium/ruby_console/commit/521b85e570717dc83481e4d2baf0804787031c46) Release 0.3.2
|
18
|
-
- [099077f](https://github.com/appium/ruby_console/commit/099077f77c83e006c7cd313ceba2fdf2b35ee0d1) Update release notes
|
19
23
|
|
20
24
|
|
21
25
|
#### v0.3.1 2013-04-26
|
@@ -23,7 +27,6 @@
|
|
23
27
|
- [5e41993](https://github.com/appium/ruby_console/commit/5e41993aa505310b3442b0ea5c8cdf72b01cd62c) Release 0.3.1
|
24
28
|
- [d98d052](https://github.com/appium/ruby_console/commit/d98d052af5e118a099d4abac7c24db41a5ff6974) Fix uninstall
|
25
29
|
- [6b10caa](https://github.com/appium/ruby_console/commit/6b10caa3be482a149e433e8053ccb23c64aa723f) Fix version command
|
26
|
-
- [b53ab55](https://github.com/appium/ruby_console/commit/b53ab550db09d246b5f975a07cda580f89088fa8) Update release notes
|
27
30
|
|
28
31
|
|
29
32
|
#### v0.3.0 2013-04-25
|
@@ -31,13 +34,11 @@
|
|
31
34
|
- [09ee29c](https://github.com/appium/ruby_console/commit/09ee29c03e4a2222c089f4ab736ec0e0bfa53930) Release 0.3.0
|
32
35
|
- [2f0f38e](https://github.com/appium/ruby_console/commit/2f0f38e86155b41ff49f3419800413589efb19c4) Update for new Appium lib
|
33
36
|
- [1bbc128](https://github.com/appium/ruby_console/commit/1bbc128cd5e7d9cadfc6ff9397179ed38459238e) Remove minitest example
|
34
|
-
- [95db897](https://github.com/appium/ruby_console/commit/95db897cdf3ffb2fec3df1aba2a7f1ca469dbed8) Update release notes
|
35
37
|
|
36
38
|
|
37
39
|
#### v0.0.30 2013-04-16
|
38
40
|
|
39
41
|
- [af1dd74](https://github.com/appium/ruby_console/commit/af1dd74f254c512c9b63a013570638eb13adbe91) Release 0.0.30
|
40
|
-
- [2b3961d](https://github.com/appium/ruby_console/commit/2b3961d6d1938693acb71e2de84a45db73f686e7) Update release notes
|
41
42
|
|
42
43
|
|
43
44
|
#### v0.0.29 2013-04-15
|
@@ -48,7 +49,6 @@
|
|
48
49
|
- [8a8401e](https://github.com/appium/ruby_console/commit/8a8401e3a01762feec5d9ab694843d96d2851a37) Rewrite test order when using reports
|
49
50
|
- [43bec7d](https://github.com/appium/ruby_console/commit/43bec7d23c36f641c049f413a7d2a97f366d1282) Add minitest example
|
50
51
|
- [211fe2e](https://github.com/appium/ruby_console/commit/211fe2ecc681403fa081ff89e7caaf0a97a440c4) Fix notes
|
51
|
-
- [f869aa8](https://github.com/appium/ruby_console/commit/f869aa8be528a9c6c71af9eecb16d5ca7bea05f2) Update release notes
|
52
52
|
|
53
53
|
|
54
54
|
#### v0.0.28 2013-04-11
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
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-05-
|
11
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
19
|
+
version: 0.3.13
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.
|
26
|
+
version: 0.3.13
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.9.12
|
33
|
+
version: 0.9.12.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.9.12
|
40
|
+
version: 0.9.12.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: toml
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 10.0.
|
61
|
+
version: 10.0.4
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 10.0.
|
68
|
+
version: 10.0.4
|
69
69
|
description: Ruby console for use with Appium.
|
70
70
|
email:
|
71
71
|
- code@bootstraponline.com
|
@@ -80,7 +80,6 @@ files:
|
|
80
80
|
- Rakefile
|
81
81
|
- appium_console.gemspec
|
82
82
|
- bin/arc
|
83
|
-
- docs.md
|
84
83
|
- img/avd_settings.png
|
85
84
|
- img/hax.png
|
86
85
|
- img/packages.png
|
@@ -117,3 +116,4 @@ signing_key:
|
|
117
116
|
specification_version: 4
|
118
117
|
summary: Ruby console for use with Appium
|
119
118
|
test_files: []
|
119
|
+
has_rdoc:
|
data/docs.md
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
Automatically convert yard's HTML output to Markdown. Run in Chrome Dev Tools console.
|
2
|
-
|
3
|
-
```javascript
|
4
|
-
// http://localhost:8808/docs/toplevel
|
5
|
-
|
6
|
-
var methods = $x('//*[@id="content"]/ul/li');
|
7
|
-
|
8
|
-
var sig = function(method) { return method.children[0].children[0].textContent.trim().substr(2); };
|
9
|
-
var desc = function(method) { return method.children[1].children[0].textContent.trim(); };
|
10
|
-
|
11
|
-
// All element methods must include the element name.
|
12
|
-
// Check textfield before text because text is included in textfield.
|
13
|
-
var elements = [ 'alert', 'button', 'textfield', 'text', 'window' ];
|
14
|
-
var output = {};
|
15
|
-
|
16
|
-
for (var b = 0; b < elements.length; b++) {
|
17
|
-
output[elements[b]] = [];
|
18
|
-
}
|
19
|
-
|
20
|
-
for (var a = 0; a < methods.length; a++) {
|
21
|
-
var name = sig(methods[a]);
|
22
|
-
var text = desc(methods[a]);
|
23
|
-
var index = '';
|
24
|
-
|
25
|
-
for (var b = 0; b < elements.length; b++) {
|
26
|
-
if (name.indexOf(elements[b]) !== -1 && name.indexOf('find_ele') === -1) {
|
27
|
-
index = elements[b];
|
28
|
-
break;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
if (index === '') { continue; }
|
33
|
-
output[index].push( [name, text] );
|
34
|
-
}
|
35
|
-
|
36
|
-
for (var b = 0; b < elements.length; b++) {
|
37
|
-
var eles = output[elements[b]];
|
38
|
-
console.log("\n" + '#### ' + elements[b]);
|
39
|
-
for (var c = 0; c < eles.length; c++) {
|
40
|
-
var ele = eles[c];
|
41
|
-
console.log('0. `' + ele[0] + '` ' + ele[1]);
|
42
|
-
}
|
43
|
-
}
|
44
|
-
```
|