appium_lib 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/driver.rb +12 -0
- data/readme.md +30 -3
- data/release_notes.md +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWIwNjQ5MmY3YTQ0YTg1NTM4YzYwZTk4ZjlmMGEzNTI4NmNhMmM4NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTRjMjNjZTQ2NzVhMzgwYTQ5MzNjMDFhNDc3MjVkYTA4NTM2YTBmNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWIyZGE2M2U3ZGQ1MjllMjQ3NDQ0N2ViNjA0ZmVlZmZhZjMxZmJhYjUyMzQy
|
10
|
+
N2IyZGRjMDIxMTRmNzQxYzRhMWZlOGU1MDc1NDdlZjQ3Y2Q2NTc0YTllZDIx
|
11
|
+
YzhiZDRmMGYyMTE1N2IyMWRhZDVjODdhN2E2ZTdlYWQ1MDYwYzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODY1ZmRiM2RhMDdhMDFkYjZmMWM0NzllYWIxY2MxNmU5YjU2OWU2MTIwZDFm
|
14
|
+
OWZkMTMxYTMxY2UzMWNkYzk4YTZjYWRkNTQ3MTUwOTMxNGMzMzFmYzdmZDkz
|
15
|
+
YTIxYjA0MjlhNGE3MTc0NWNjODcyM2E1MzA1MDUwZTZjODYxZGE=
|
@@ -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.3.
|
5
|
-
DATE = '2013-04-
|
4
|
+
VERSION = '0.3.3' unless defined? ::Appium::VERSION
|
5
|
+
DATE = '2013-04-27' unless defined? ::Appium::DATE
|
6
6
|
end
|
data/lib/appium_lib/driver.rb
CHANGED
@@ -34,6 +34,9 @@ module Appium
|
|
34
34
|
class Driver
|
35
35
|
@@loaded = false
|
36
36
|
|
37
|
+
attr_reader :app_path, :app_name, :app_package, :app_activity,
|
38
|
+
:app_wait_activity, :sauce_username, :sauce_access_key,
|
39
|
+
:port, :os, :ios_js
|
37
40
|
def initialize opts={}
|
38
41
|
opts = {} if opts.nil?
|
39
42
|
# Path to the .apk, .app or .app.zip.
|
@@ -158,6 +161,15 @@ module Appium
|
|
158
161
|
start_driver
|
159
162
|
end
|
160
163
|
|
164
|
+
# return driver
|
165
|
+
def driver
|
166
|
+
@driver
|
167
|
+
end
|
168
|
+
|
169
|
+
def screenshot png_save_path
|
170
|
+
@driver.save_screenshot png_save_path
|
171
|
+
end
|
172
|
+
|
161
173
|
# Quits the driver
|
162
174
|
# @return [void]
|
163
175
|
def driver_quit
|
data/readme.md
CHANGED
@@ -29,16 +29,43 @@ gem install --no-rdoc --no-ri appium_lib
|
|
29
29
|
```ruby
|
30
30
|
require 'appium_lib'
|
31
31
|
|
32
|
-
# Start
|
33
|
-
|
32
|
+
# Start an iOS driver based on APP_PATH
|
33
|
+
app = { 'APP_PATH' => '/path/to/MyiOS.app' }
|
34
|
+
Appium::Driver.new(app).start_driver
|
34
35
|
|
35
36
|
# Start an Android driver
|
36
37
|
# must quit old driver before starting a new one
|
37
38
|
driver_quit
|
38
|
-
apk = { 'APP_PATH'
|
39
|
+
apk = { 'APP_PATH' => '/path/to/the.apk',
|
40
|
+
'APP_PACKAGE' => 'com.example.pkg',
|
41
|
+
'APP_ACTIVITY' => 'act.Start',
|
42
|
+
'APP_WAIT_ACTIVITY' => 'act.Splash' }
|
39
43
|
Appium::Driver.new(apk).start_driver
|
40
44
|
```
|
41
45
|
|
46
|
+
#### iOS env vars
|
47
|
+
|
48
|
+
- `APP_PATH` Path to the .app folder
|
49
|
+
|
50
|
+
#### Android env vars
|
51
|
+
|
52
|
+
- `APP_PATH` Path to the apk
|
53
|
+
- `APP_PACKAGE` The APK's package
|
54
|
+
- `APP_ACTIVITY` Activity to start
|
55
|
+
- `APP_WAIT_ACTIVITY` Optional. Activity to wait for.
|
56
|
+
|
57
|
+
#### Sauce Labs env vars
|
58
|
+
|
59
|
+
- `APP_NAME` Name of the test run
|
60
|
+
- `SAUCE_USERNAME` Sauce username
|
61
|
+
- `SAUCE_ACCESS_KEY` Sauce API key
|
62
|
+
|
63
|
+
#### Troubleshooting
|
64
|
+
|
65
|
+
1. Does `adb kill-server; adb devices` list an active Android device?
|
66
|
+
2. Have you defined the proper env vars? `APP_PATH, APP_PACKAGE, APP_ACTIVITY, APP_WAIT_ACTIVITY`
|
67
|
+
3. Are you running appium from source? `node server.js -V --fast-reset`
|
68
|
+
|
42
69
|
#### Documentation
|
43
70
|
|
44
71
|
See [docs.md](https://github.com/appium/ruby_lib/blob/master/docs.md)
|
data/release_notes.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
#### v0.3.2 2013-04-26
|
2
|
+
|
3
|
+
- [eee6632](https://github.com/appium/ruby_lib/commit/eee6632251c40c8b2d6be9a361f429d7c89762f8) Release 0.3.2
|
4
|
+
- [b22d747](https://github.com/appium/ruby_lib/commit/b22d7473f03e1b13a1ffd9ddc2ea5ca1396c4642) Default to app_activity if app_wait_activity is not set
|
5
|
+
- [76198ad](https://github.com/appium/ruby_lib/commit/76198ad4d169d836007a247b2ebe8cad5391f512) Fix reset clearing iOS JavaScript
|
6
|
+
- [445519b](https://github.com/appium/ruby_lib/commit/445519b4528c9c253865f76fdac921a22c31fbd7) Use Appium's detailed error messages
|
7
|
+
- [e00964f](https://github.com/appium/ruby_lib/commit/e00964fa7b9ccd047b06f1432ddd1e62170306df) Update readme.md
|
8
|
+
- [ef0b626](https://github.com/appium/ruby_lib/commit/ef0b626940d86fd07dbb86ac16b40dd5b0b5ce4a) Avoid invisible elements
|
9
|
+
- [7278574](https://github.com/appium/ruby_lib/commit/727857450f0d2fc29ef53bbe4f5536619eedb250) Update release notes
|
10
|
+
|
11
|
+
|
1
12
|
#### v0.3.1 2013-04-26
|
2
13
|
|
3
14
|
- [e00fc6e](https://github.com/appium/ruby_lib/commit/e00fc6efb8f0c94ac6e196e831980ee96676b645) Release 0.3.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.3.
|
4
|
+
version: 0.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: 2013-04-
|
11
|
+
date: 2013-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|