appium_console 2.8.1 → 2.9.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/appium_console.gemspec +10 -10
- data/lib/appium_console.rb +3 -3
- data/lib/appium_console/version.rb +2 -2
- data/lib/cli.rb +1 -5
- data/readme.md +20 -53
- data/release_notes.md +8 -0
- metadata +7 -14
- data/ios_v_android.md +0 -58
- data/osx.md +0 -260
- data/osx_install.rake +0 -135
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ec6b4722250552ced187766bbf0ceb732d78d02
|
4
|
+
data.tar.gz: e8555939b2a8b3477654283d3cd6e3e28b37255e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6764060ef3fd4b50e79ce3098fd6a24e22855f63de3eaf63b37351c785695ea0488f96565b284df44954c6d3349a74cb927212b88b2b96cb4d92f444a8663c9e
|
7
|
+
data.tar.gz: 3010e49e7202a953e99923a67a15f0e2ba7473c83ef9ab23614ad4696246bdfedd501219022f753c2894f3d5f9c0db67b4c1fe62e2a595f8d583c92454696788
|
data/appium_console.gemspec
CHANGED
@@ -10,21 +10,21 @@ add_to_path 'lib'
|
|
10
10
|
require 'appium_console/version'
|
11
11
|
|
12
12
|
Gem::Specification.new do |s|
|
13
|
-
# 1.8.x is not supported
|
14
13
|
s.required_ruby_version = '>= 2.2'
|
15
14
|
|
16
|
-
s.name
|
17
|
-
s.version
|
18
|
-
s.date
|
19
|
-
s.license
|
20
|
-
s.description
|
21
|
-
s.description
|
22
|
-
s.authors
|
23
|
-
s.
|
15
|
+
s.name = 'appium_console'
|
16
|
+
s.version = Appium::Console::VERSION
|
17
|
+
s.date = Appium::Console::DATE
|
18
|
+
s.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
19
|
+
s.description = s.summary = 'Appium Ruby Console'
|
20
|
+
s.description += '.' # avoid identical warning
|
21
|
+
s.authors = ['code@bootstraponline.com', 'Kazuaki Matsuo']
|
22
|
+
s.email = %w(code@bootstraponline.com fly.49.89.over@gmail.com)
|
23
|
+
s.homepage = 'https://github.com/appium/ruby_console' # published as appium_console
|
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', '~> 9
|
27
|
+
s.add_runtime_dependency 'appium_lib', '~> 9.15.0'
|
28
28
|
s.add_runtime_dependency 'awesome_print', '~> 1.7'
|
29
29
|
s.add_runtime_dependency 'pry', '~> 0.11.0'
|
30
30
|
s.add_runtime_dependency 'bond', '~> 0.5'
|
data/lib/appium_console.rb
CHANGED
@@ -44,9 +44,9 @@ module Appium
|
|
44
44
|
if has_requires
|
45
45
|
requires = parsed[:appium_lib][:require]
|
46
46
|
|
47
|
-
|
48
|
-
load_files = requires.map {
|
49
|
-
cmd
|
47
|
+
unless requires.empty?
|
48
|
+
load_files = requires.map {|f| %(require "#{f}";)}.join "\n"
|
49
|
+
cmd += ['-e', load_files]
|
50
50
|
end
|
51
51
|
|
52
52
|
$stdout.puts "pry #{cmd.join(' ')}"
|
@@ -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 = '2.
|
6
|
-
DATE = '
|
5
|
+
VERSION = '2.9.0' unless defined? ::Appium::Console::VERSION
|
6
|
+
DATE = '2018-08-16' unless defined? ::Appium::Console::DATE
|
7
7
|
end
|
data/lib/cli.rb
CHANGED
data/readme.md
CHANGED
@@ -1,62 +1,29 @@
|
|
1
1
|
[](https://rubygems.org/gems/appium_console)
|
2
2
|
[](http://issuestats.com/github/appium/ruby_console)
|
3
3
|
[](http://issuestats.com/github/appium/ruby_console)
|
4
|
-
|
4
|
+
[](http://badge.fury.io/rb/appium_console)[](https://gemnasium.com/appium/ruby_console)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
#### How to use
|
9
|
-
|
10
|
-
Read the [bootcamp guide on the ruby console](https://wiki.saucelabs.com/display/DOCS/Appium+Bootcamp+2%3A+Configuring+Appium).
|
11
|
-
|
12
|
-
#### Update system
|
13
|
-
|
14
|
-
Paste the following into Terminal. If you're not using [RVM](https://rvm.io/), you may have to prefix gem commands with sudo.
|
15
|
-
|
16
|
-
```bash
|
17
|
-
gem update --system ;\
|
18
|
-
gem update bundler
|
19
|
-
```
|
20
|
-
|
21
|
-
#### Pry commands
|
22
|
-
|
23
|
-
Pry commands are prefixed with `%`. For example `%reset` invokes Pry's reset command.
|
24
|
-
To use the ruby_lib reset, it's `reset`
|
6
|
+
# Appium Ruby Console
|
25
7
|
|
26
|
-
|
27
|
-
|
28
|
-
```bash
|
29
|
-
gem uninstall -aIx appium_lib ;\
|
30
|
-
gem uninstall -aIx appium_console ;\
|
31
|
-
gem install --no-rdoc --no-ri appium_console bond
|
32
|
-
```
|
33
|
-
|
34
|
-
The bond gem is necessary for proper auto complete. Installing it will fix this error `NameError: uninitialized constant Pry::BondCompleter::Bond`
|
35
|
-
|
36
|
-
#### Notes
|
8
|
+
- [appium_console on RubyGems](https://rubygems.org/gems/appium_console)
|
37
9
|
|
38
|
-
|
39
|
-
|
40
|
-
|
10
|
+
## How to use
|
11
|
+
1. Setup Appium
|
12
|
+
- Read [a setup guide](http://appium.io/docs/en/about-appium/getting-started/?lang=en)
|
13
|
+
2. Install `appium_console`
|
14
|
+
```bash
|
15
|
+
gem uninstall -aIx appium_lib ;\
|
16
|
+
gem uninstall -aIx appium_console ;\
|
17
|
+
gem install --no-rdoc --no-ri appium_console
|
41
18
|
```
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
- `arc help` prints a description of all available commands
|
51
|
-
- `arc version` prints the current version of appium console and appium lib.
|
52
|
-
- `arc setup android` creates `appium.txt` for android in the current working dir.
|
53
|
-
- `arc setup ios` creates `appium.txt` for ios in the current working dir.
|
54
|
-
- `arc toml FILE` starts arc with toml FILE path
|
19
|
+
3. Run
|
20
|
+
- The `arc` command starts Appium Ruby Console.
|
21
|
+
- `arc help` prints a description of all available commands
|
22
|
+
- `arc version` prints the current version of appium console and appium lib.
|
23
|
+
- `arc setup android` creates `appium.txt` for android in the current working dir.
|
24
|
+
- `arc setup ios` creates `appium.txt` for ios in the current working dir.
|
25
|
+
- `arc toml FILE` starts arc with toml FILE path
|
55
26
|
|
56
|
-
|
27
|
+
## Documentation
|
57
28
|
|
58
|
-
- [
|
59
|
-
- [Overview](https://github.com/appium/ruby_lib/blob/master/docs/docs.md)
|
60
|
-
- [Android methods](https://github.com/appium/ruby_lib/blob/master/docs/android_docs.md)
|
61
|
-
- [iOS methods](https://github.com/appium/ruby_lib/blob/master/docs/ios_docs.md)
|
62
|
-
- [Appium docs](https://github.com/appium/appium/tree/master/docs)
|
29
|
+
- [ruby_lib](https://github.com/appium/ruby_lib)
|
data/release_notes.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
#### v2.9.0 2018-08-16
|
2
|
+
|
3
|
+
- [6f9d1a6](https://github.com/appium/ruby_console/commit/6f9d1a63def0498381db3e004872150d2ab7ffa1) Release 2.9.0
|
4
|
+
- [5fdcf53](https://github.com/appium/ruby_console/commit/5fdcf53188e0b72e50f98417491c4f4a65595103) bump up
|
5
|
+
- [ec7e883](https://github.com/appium/ruby_console/commit/ec7e8832611d09136bae73aaec68ca41aa10d472) tweak gemspec (#92)
|
6
|
+
- [b445f3d](https://github.com/appium/ruby_console/commit/b445f3dbae43f07289ab16adf2142eade9d8da86) delete outdated documentation (#91)
|
7
|
+
|
8
|
+
|
1
9
|
#### v2.8.1 2017-12-21
|
2
10
|
|
3
11
|
- [9b840d2](https://github.com/appium/ruby_console/commit/9b840d23b12a6942ca2cf1fc6eafc31aecdf789d) Release 2.8.1
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
|
+
- Kazuaki Matsuo
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: appium_lib
|
@@ -16,20 +17,14 @@ dependencies:
|
|
16
17
|
requirements:
|
17
18
|
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '9.8'
|
20
|
+
version: 9.15.0
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - "~>"
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '9.8'
|
27
|
+
version: 9.15.0
|
33
28
|
- !ruby/object:Gem::Dependency
|
34
29
|
name: awesome_print
|
35
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,6 +152,7 @@ dependencies:
|
|
157
152
|
description: Appium Ruby Console.
|
158
153
|
email:
|
159
154
|
- code@bootstraponline.com
|
155
|
+
- fly.49.89.over@gmail.com
|
160
156
|
executables:
|
161
157
|
- arc
|
162
158
|
extensions: []
|
@@ -170,13 +166,10 @@ files:
|
|
170
166
|
- bin/arc
|
171
167
|
- img/avd_settings.png
|
172
168
|
- img/packages.png
|
173
|
-
- ios_v_android.md
|
174
169
|
- lib/appium_console.rb
|
175
170
|
- lib/appium_console/version.rb
|
176
171
|
- lib/cli.rb
|
177
172
|
- lib/start.rb
|
178
|
-
- osx.md
|
179
|
-
- osx_install.rake
|
180
173
|
- readme.md
|
181
174
|
- release_notes.md
|
182
175
|
- templates/appium.txt.erb
|
@@ -201,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
194
|
version: '0'
|
202
195
|
requirements: []
|
203
196
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.6.
|
197
|
+
rubygems_version: 2.6.14
|
205
198
|
signing_key:
|
206
199
|
specification_version: 4
|
207
200
|
summary: Appium Ruby Console
|
data/ios_v_android.md
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
#### Notes on iOS and Android Appium compatibility
|
2
|
-
|
3
|
-
#### iOS Ghosting
|
4
|
-
|
5
|
-
It's not uncommon to have multiple elements from different pages. To find the correct back button for example,
|
6
|
-
it's necessary to find all the back buttons `names('Back')` and then return the first one that's displayed.
|
7
|
-
|
8
|
-
This has implications for searching by index. If you select textfield 1 for the 1st textfield, then you may
|
9
|
-
be getting a textfield from a previous page. The solution is to ensure each element has a unique accessibility identifier
|
10
|
-
and to verify visibility and type.
|
11
|
-
|
12
|
-
#### iPhone vs iPad
|
13
|
-
|
14
|
-
iPad will contain elements from visible background screens. iPhone will have only one screen, however the keyboard can only be dismissed by clicking somewhere.
|
15
|
-
The iPad has a hide keyboard button. The iPhone will use `Next` and `Go` on a typical login screen via the on screen keyboard.
|
16
|
-
|
17
|
-
- setValue will immediately set the value
|
18
|
-
- hideKeyboard will attempt to hide the iPad keyboard and fail on iPhone
|
19
|
-
- find_element(:tag_name, :window).click should work everywhere
|
20
|
-
|
21
|
-
##### Tag Names
|
22
|
-
|
23
|
-
`secure` is not possible to implement on Android using uiautomator. `textfield` and `secure` are both considered `edittext`.
|
24
|
-
|
25
|
-
`textfield` returns all textfields, including secure on Android. `secure` will error on Android.
|
26
|
-
on iOS `textfield` will not match secure text fields.
|
27
|
-
|
28
|
-
##### Search strategy
|
29
|
-
|
30
|
-
Android
|
31
|
-
|
32
|
-
- `android:id` is not accessible via uiautomator
|
33
|
-
- `name` content description (defined in activity XML or dynamically)
|
34
|
-
- `text` text content of the UI widget
|
35
|
-
- `tag_name` the android class
|
36
|
-
|
37
|
-
`text` is [not a selenium search strategy](https://github.com/appium/appium/issues/241#issuecomment-14582659) so use XPath.
|
38
|
-
|
39
|
-
`secure` on iOS will return value.
|
40
|
-
|
41
|
-
`EditText` used as password field on Andorid will always return an empty string.
|
42
|
-
|
43
|
-
--
|
44
|
-
|
45
|
-
iOS .name returns the [accessibility attribute](http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Reference/UIAElementClassReference/UIAElement/UIAElement.html#//apple_ref/javascript/instm/UIAElement/name) if it's set. if not set, the string value is used.
|
46
|
-
|
47
|
-
Android .name returns the accessibility attribute and nothing if it's not set.
|
48
|
-
|
49
|
-
#### More options button
|
50
|
-
|
51
|
-
The android `options` button will be hidden if the device has a hardware menu button. To work around this:
|
52
|
-
|
53
|
-
```ruby
|
54
|
-
# see abs__action_menu_overflow_description in ActionBarSherlock
|
55
|
-
# click more options if it exists. if it doesn't then the device has a hardware menu button that must be pressed instead.
|
56
|
-
exists { name 'more options' } ? name('more options').click : mobile(:keyevent, keycode: 82)
|
57
|
-
```
|
58
|
-
|
data/osx.md
DELETED
@@ -1,260 +0,0 @@
|
|
1
|
-
### Getting Started
|
2
|
-
|
3
|
-
This document is written for OS X 10.9.2 or better. iOS testing requires OS X. Android testing works on OS X, Windows, and Linux.
|
4
|
-
|
5
|
-
#### Steps to install
|
6
|
-
|
7
|
-
Install `Xcode` 5.1.1.
|
8
|
-
|
9
|
-
- Xcode 5.0.0 shouldn't be used for iOS 6 as it's flaky.
|
10
|
-
- Xcode 5.0.1 is broken.
|
11
|
-
- Xcode 4.6.3 doesn't support iOS 7.
|
12
|
-
|
13
|
-
After that, install the command line build tools for your version of OS X (Xcode -> Open Developer Tools -> More Developer Tools).
|
14
|
-
|
15
|
-
- Install Java 7 if there's no Java on the system.
|
16
|
-
- [JDK 7](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
17
|
-
|
18
|
-
- Install stable release of Ruby.
|
19
|
-
|
20
|
-
`$ \curl -L https://get.rvm.io | bash -s stable --ruby`
|
21
|
-
|
22
|
-
- Make sure RVM is using the correct Ruby by default
|
23
|
-
|
24
|
-
```
|
25
|
-
$ rvm list
|
26
|
-
$ rvm --default use 2.3.0
|
27
|
-
```
|
28
|
-
|
29
|
-
- If you have an old ruby, you can installing Ruby 2.3.0 instead
|
30
|
-
|
31
|
-
```
|
32
|
-
$ rvm get head
|
33
|
-
$ rvm autolibs homebrew
|
34
|
-
$ rvm install 2.3.0
|
35
|
-
```
|
36
|
-
|
37
|
-
- Check that it's installed properly by printing the ruby version.
|
38
|
-
|
39
|
-
`$ ruby --version`
|
40
|
-
|
41
|
-
- Update RubyGems and Bundler.
|
42
|
-
|
43
|
-
```ruby
|
44
|
-
gem update --system ;\
|
45
|
-
gem install --no-rdoc --no-ri bundler ;\
|
46
|
-
gem update ;\
|
47
|
-
gem cleanup
|
48
|
-
```
|
49
|
-
|
50
|
-
- Check that RubyGems is >= 2.1.5
|
51
|
-
|
52
|
-
```bash
|
53
|
-
$ gem --version
|
54
|
-
2.6.4
|
55
|
-
```
|
56
|
-
|
57
|
-
- Install appium_console gem.
|
58
|
-
|
59
|
-
```ruby
|
60
|
-
gem uninstall -aIx appium_lib ;\
|
61
|
-
gem uninstall -aIx appium_console ;\
|
62
|
-
gem install --no-rdoc --no-ri appium_console
|
63
|
-
```
|
64
|
-
|
65
|
-
- Install [flaky](https://github.com/appium/flaky) gem.
|
66
|
-
|
67
|
-
```ruby
|
68
|
-
gem uninstall -aIx flaky ;\
|
69
|
-
gem install --no-rdoc --no-ri flaky
|
70
|
-
```
|
71
|
-
|
72
|
-
- Install [brew](http://mxcl.github.io/homebrew/)
|
73
|
-
|
74
|
-
`ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"`
|
75
|
-
|
76
|
-
- Install [nodejs](http://nodejs.org/) using brew.
|
77
|
-
|
78
|
-
```
|
79
|
-
brew update ;\
|
80
|
-
brew upgrade node ;\
|
81
|
-
brew install node
|
82
|
-
```
|
83
|
-
|
84
|
-
- Node should be `v0.10.5` or better.
|
85
|
-
Don't use the big green install button on nodejs.org or all npm commands will require sudo.
|
86
|
-
|
87
|
-
`$ node --version`
|
88
|
-
|
89
|
-
`$ npm --version`
|
90
|
-
|
91
|
-
- Install grunt.
|
92
|
-
|
93
|
-
`npm install -g grunt grunt-cli`
|
94
|
-
|
95
|
-
- Run the version command from the appium folder. If you're not in that folder, the grunt version will not display.
|
96
|
-
|
97
|
-
```bash
|
98
|
-
$ grunt --version
|
99
|
-
grunt-cli v0.1.6
|
100
|
-
grunt v0.4.1
|
101
|
-
```
|
102
|
-
|
103
|
-
- Install [ant](http://ant.apache.org/) if it's not already installed.
|
104
|
-
- Install [maven 3.1.1 or better](http://maven.apache.org/download.cgi) if it's not already installed. Old maven will not work.
|
105
|
-
|
106
|
-
Ant and maven can be installed manually or using brew.
|
107
|
-
|
108
|
-
```bash
|
109
|
-
$ brew update
|
110
|
-
$ brew install ant
|
111
|
-
$ brew install maven
|
112
|
-
```
|
113
|
-
|
114
|
-
```
|
115
|
-
$ ant -version
|
116
|
-
Apache Ant(TM) version 1.9.7 compiled on April 9 2016
|
117
|
-
$ mvn -version
|
118
|
-
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T09:41:47-07:00)
|
119
|
-
```
|
120
|
-
|
121
|
-
- Clone appium
|
122
|
-
|
123
|
-
`$ git clone git://github.com/appium/appium.git`
|
124
|
-
|
125
|
-
- Run reset.sh. When running reset.sh, make sure to be on Xcode 5.0.2 for best results. You may have problems if you reset on Xcode 4.6.3 and then switch to a newer Xcode.
|
126
|
-
|
127
|
-
`cd appium; ./reset.sh`
|
128
|
-
|
129
|
-
If you see config errors, try cleaning git. `git clean -dfx; git reset --hard`
|
130
|
-
|
131
|
-
You can also reset by platform. `./reset.sh --android`
|
132
|
-
|
133
|
-
If npm is having issues, you may have to disable https. I don't recommend this, however if you must this is how to do so:
|
134
|
-
|
135
|
-
`npm config set registry http://registry.npmjs.org/`
|
136
|
-
|
137
|
-
|
138
|
-
- Authorize for iOS testing. Must run reset.sh as mentioned above before running the grunt task.
|
139
|
-
|
140
|
-
> sudo \`which grunt\` authorize
|
141
|
-
|
142
|
-
- Start appium.
|
143
|
-
|
144
|
-
`node .`
|
145
|
-
|
146
|
-
|
147
|
-
#### Bash Profile
|
148
|
-
- Add the Android SDK tools folder to your path so you can run `android`.
|
149
|
-
- Define the `ANDROID_HOME` env var pointing to SDK root. On OSX place it in `~/.bash_profile`
|
150
|
-
- You may have to add grunt as well `/usr/local/share/npm/bin/grunt`
|
151
|
-
|
152
|
-
```
|
153
|
-
# ~/.bash_profile
|
154
|
-
export ANDROID_HOME=$HOME/Downloads/android-sdk-macosx
|
155
|
-
export ANDROID_SDK=$ANDROID_HOME
|
156
|
-
PATH=$PATH:/Applications/apache-ant-1.8.4/bin
|
157
|
-
PATH=$PATH:/usr/local/share/npm/bin/
|
158
|
-
PATH=$PATH:$ANDROID_HOME/build-tools
|
159
|
-
PATH=$PATH:$ANDROID_HOME/platform-tools
|
160
|
-
PATH=$PATH:$ANDROID_HOME/tools
|
161
|
-
export JAVA_HOME="`/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home`"
|
162
|
-
|
163
|
-
export PATH
|
164
|
-
```
|
165
|
-
|
166
|
-
- Run `android` to open the SDK manager.
|
167
|
-
- Install `Intel x86 Emulator Accelerator (HAXM)` under Extras
|
168
|
-
- Install API 19 `SDK Platform`, `Intel x86 Atom System Image`, `Google APIs`
|
169
|
-
If there are any problems viewing or downloading the packages, go to `Packages -> Reload` and try again.
|
170
|
-
|
171
|
-

|
172
|
-
|
173
|
-
- Create a new Android virtual device that uses the Intel image. Note that some apps may have issues when `Use Host GPU` is enabled or SD cards [aren't formatted properly](http://stackoverflow.com/questions/5744298/what-does-this-mean-failure-install-failed-container-error). Set `VM Heap` to `64`. `32` is too small. The emulator is very slow when Use Host GPU is disabled. If you have to disable it then consider testing on a physical device which will be faster.
|
174
|
-
|
175
|
-

|
176
|
-
|
177
|
-
`android avd`
|
178
|
-
|
179
|
-
- Check that `hax is working` If it's not, install hax [directly from Intel](http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager)
|
180
|
-
|
181
|
-
```bash
|
182
|
-
$ emulator @android
|
183
|
-
HAX is working and emulator runs in fast virt mode
|
184
|
-
```
|
185
|
-
|
186
|
-
- Launch the emulator with `emulator @android`
|
187
|
-
|
188
|
-
- After launching the emulator, check that it's listed in adb devices. Run the following commands a few times until it's listed.
|
189
|
-
|
190
|
-
`adb kill-server; adb devices`
|
191
|
-
|
192
|
-
If you see `error: protocol fault (no status)` just keep running the command until the emulator is detected.
|
193
|
-
|
194
|
-
- 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.
|
195
|
-
|
196
|
-
- Start appium console
|
197
|
-
|
198
|
-
`arc`
|
199
|
-
|
200
|
-
- See [running on OS X](https://github.com/appium/appium/blob/master/docs/en/appium-setup/running-on-osx.md)
|
201
|
-
|
202
|
-
#### Troubleshooting
|
203
|
-
|
204
|
-
- If install fails, keep trying to install a few times.
|
205
|
-
|
206
|
-
When using `Appium.app` make sure to set Appium -> Preferences... -> Check "Use External Appium Package" and set it to the path of Appium cloned from GitHub.
|
207
|
-
|
208
|
-
Fix permission errors. npm shouldn't require sudo.
|
209
|
-
|
210
|
-
```bash
|
211
|
-
brew uninstall node
|
212
|
-
brew install node
|
213
|
-
rm -rf ./node_modules # run from the appium folder
|
214
|
-
rm -rf "/Users/`whoami`/.npm"
|
215
|
-
rm -rf /usr/local/lib/node_modules/
|
216
|
-
./reset.sh --ios
|
217
|
-
./reset.sh --android
|
218
|
-
```
|
219
|
-
|
220
|
-
- [Helper bash methods](https://gist.github.com/bootstraponline/5580587)
|
221
|
-
|
222
|
-
#### SSL Issues
|
223
|
-
|
224
|
-
> Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
|
225
|
-
|
226
|
-
- [Fix SSL issues](http://railsapps.github.io/openssl-certificate-verify-failed.html) with:
|
227
|
-
|
228
|
-
```bash
|
229
|
-
$ rvm osx-ssl-certs update all
|
230
|
-
$ rvm osx-ssl-certs status all
|
231
|
-
```
|
232
|
-
|
233
|
-
#### Maven on OS X 10.9
|
234
|
-
|
235
|
-
```bash
|
236
|
-
$ cd /usr/local
|
237
|
-
$ git reset --hard origin/master
|
238
|
-
|
239
|
-
$ brew update
|
240
|
-
$ brew install maven
|
241
|
-
```
|
242
|
-
|
243
|
-
#### HAXM on OS X 10.9
|
244
|
-
|
245
|
-
Install the [HAXM 10.9 hotfix](http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macos-hotfix
|
246
|
-
).
|
247
|
-
|
248
|
-
#### Restore dev tools on 10.9
|
249
|
-
|
250
|
-
`xcode-select --install`
|
251
|
-
|
252
|
-
- [Install specific node version](https://coderwall.com/p/lqphzg)
|
253
|
-
|
254
|
-
#### Corrupt ruby gems
|
255
|
-
|
256
|
-
If you see:
|
257
|
-
|
258
|
-
> invalid gem: package is corrupt, exception while verifying: undefined method
|
259
|
-
|
260
|
-
Then run `$ rm -rf ~/.rvm` and reinstall RVM.
|
data/osx_install.rake
DELETED
@@ -1,135 +0,0 @@
|
|
1
|
-
# For OS X, installs all the dependencies for Appium's ruby console, per these instructions:
|
2
|
-
#
|
3
|
-
# https://github.com/appium/ruby_console/blob/master/osx.md
|
4
|
-
#
|
5
|
-
# Changes to this file might imply changes to those instructions as well.
|
6
|
-
|
7
|
-
def sh_success(cmd)
|
8
|
-
success = false
|
9
|
-
begin
|
10
|
-
success, status = sh cmd
|
11
|
-
rescue
|
12
|
-
# do nothing
|
13
|
-
end
|
14
|
-
|
15
|
-
success
|
16
|
-
end
|
17
|
-
|
18
|
-
def has_cmd(cmd)
|
19
|
-
sh_success "which #{cmd}"
|
20
|
-
end
|
21
|
-
|
22
|
-
THIS_DIR = File.expand_path(File.dirname(__FILE__))
|
23
|
-
APPIUM_DIR = "#{THIS_DIR}/appium"
|
24
|
-
|
25
|
-
GCC = '/usr/bin/gcc'
|
26
|
-
GCC42_CMD = 'gcc-4.2'
|
27
|
-
GCC42 = "/usr/local/bin/#{GCC42_CMD}"
|
28
|
-
|
29
|
-
file GCC do
|
30
|
-
fail "#{GCC} does not exist. This is likely because you do not have Xcode command line tools installed."
|
31
|
-
end
|
32
|
-
|
33
|
-
file GCC42 => [GCC] do
|
34
|
-
sh "ln -s #{GCC} #{GCC42}"
|
35
|
-
end
|
36
|
-
|
37
|
-
task :gcc do
|
38
|
-
if !has_cmd('gcc-4.2') then
|
39
|
-
Rake::Task[GCC42].invoke
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
task :java do
|
44
|
-
if !has_cmd('java') then
|
45
|
-
puts "You must install java to continue."
|
46
|
-
puts "cf. http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
task :ruby => [:gcc] do
|
51
|
-
if has_cmd('rvm') then
|
52
|
-
# doesn't hurt anything if already installed
|
53
|
-
sh 'rvm install 2.0.0'
|
54
|
-
else
|
55
|
-
sh '\curl -L https://get.rvm.io | bash -s stable --ruby=2.0.0'
|
56
|
-
end
|
57
|
-
|
58
|
-
system '/bin/bash --login -i -c "rvm use --default 2.0.0"'
|
59
|
-
sh 'rvm osx-ssl-certs update all'
|
60
|
-
end
|
61
|
-
|
62
|
-
task :gems => [:ruby] do
|
63
|
-
sh 'gem update --system'
|
64
|
-
sh 'gem install --no-rdoc --no-ri bundler'
|
65
|
-
sh 'gem update'
|
66
|
-
sh 'gem cleanup'
|
67
|
-
sh 'gem uninstall -aIx appium_lib'
|
68
|
-
sh 'gem uninstall -aIx appium_console'
|
69
|
-
sh 'gem install --no-rdoc --no-ri appium_console'
|
70
|
-
sh 'gem uninstall -aIx flaky'
|
71
|
-
sh 'gem install --no-rdoc --no-ri flaky'
|
72
|
-
end
|
73
|
-
|
74
|
-
task :brew do
|
75
|
-
if has_cmd('brew') then
|
76
|
-
sh 'brew update'
|
77
|
-
else
|
78
|
-
sh 'ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"'
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
task :ant do
|
83
|
-
if !has_cmd('ant') then
|
84
|
-
fail "Ant must be installed to complete this setup."
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
task :maven do
|
89
|
-
if !has_cmd('mvn') then
|
90
|
-
Rake::Task[:brew].invoke
|
91
|
-
sh 'brew install maven'
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
task :nodejs => [:brew] do
|
96
|
-
sh 'brew install node' # noop if already installed
|
97
|
-
if sh_success 'brew outdated | grep node' then
|
98
|
-
sh 'brew upgrade node'
|
99
|
-
end if
|
100
|
-
|
101
|
-
# make sure it's installed
|
102
|
-
sh 'node --version'
|
103
|
-
sh 'npm --version'
|
104
|
-
end
|
105
|
-
|
106
|
-
task :grunt => [:nodejs] do
|
107
|
-
if !sh_success('grunt --version') then
|
108
|
-
sh 'npm install -g grunt grunt-cli'
|
109
|
-
sh 'grunt --version'
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
# we only clone when the directory doesn't already exist
|
114
|
-
directory APPIUM_DIR do
|
115
|
-
cd THIS_DIR
|
116
|
-
sh 'git clone git://github.com/appium/appium.git'
|
117
|
-
end
|
118
|
-
|
119
|
-
# appium goes into the directory below where this Rakefile is
|
120
|
-
desc 'Downloads appium and all dependencies, and starts up appium. May require a superuser password.'
|
121
|
-
task :appium => [APPIUM_DIR, :grunt, :maven, :ant, :gems, :ruby, :java] do
|
122
|
-
cd APPIUM_DIR
|
123
|
-
sh 'git pull origin master'
|
124
|
-
sh './reset.sh'
|
125
|
-
|
126
|
-
begin
|
127
|
-
sh 'sudo `which grunt` authorize'
|
128
|
-
rescue
|
129
|
-
# grunt errors if it has already been authorized, so ... I guess we'll ignore errors then
|
130
|
-
end
|
131
|
-
|
132
|
-
sh 'node server.js'
|
133
|
-
end
|
134
|
-
|
135
|
-
task :default => :appium
|