Skip to content

Commit 07da208

Browse files
Add troubleshooting steps
1 parent 7df8ddc commit 07da208

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

readme.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,42 @@ gem install --no-rdoc --no-ri appium_lib
3030
require 'appium_lib'
3131

3232
# Start a driver based on APP_PATH
33-
Appium::Driver.new.start_driver
33+
app = { 'APP_PATH' => '/path/to/MyiOS.app' }
34+
Appium::Driver.new(app).start_driver
3435

3536
# Start an Android driver
3637
# must quit old driver before starting a new one
3738
driver_quit
38-
apk = { 'APP_PATH' => ENV['APP_APK'] }
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' }
3943
Appium::Driver.new(apk).start_driver
4044
```
4145

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+
4269
#### Documentation
4370

4471
See [docs.md](https://github.com/appium/ruby_lib/blob/master/docs.md)

0 commit comments

Comments
 (0)