Skip to content

Commit

Permalink
add selendroid test writing docs and link to running-tests doc from R…
Browse files Browse the repository at this point in the history
…EADME
  • Loading branch information
jlipps committed Oct 30, 2013
1 parent 58c9699 commit d3539fb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ You can run an Appium server using node.js or using the application, see below.

## Writing Tests for Appium

We support a subset of the [Selenium WebDriver JSON Wire Protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
The main guide for getting started writing and running tests is [the running tests](https://github.com/appium/appium/blob/master/docs/running-tests.md) doc, which includes explanations for iOS, Android, and Android older devices.

First and foremost, specify mobile-targeted [desired capabilities](https://github.com/appium/appium/blob/master/docs/caps.md) to run your test through Appium.
Essentially, we support a subset of the [Selenium WebDriver JSON Wire Protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol), and extend it so that you can specify mobile-targeted [desired capabilities](https://github.com/appium/appium/blob/master/docs/caps.md) to run your test through Appium.

You find elements by using a subset of WebDriver's element-finding strategies.
See [finding elements](https://github.com/appium/appium/blob/master/docs/finding-elements.md) for detailed information.

We also have several extensions to the JSON Wire Protocol for [automating
See [finding elements](https://github.com/appium/appium/blob/master/docs/finding-elements.md) for detailed information. We also have several extensions to the JSON Wire Protocol for [automating
mobile gestures](https://github.com/appium/appium/blob/master/docs/gestures.md)
like tap, flick, and swipe.

Expand Down
35 changes: 32 additions & 3 deletions docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ And wait for the android emulator to finish launching. Sometimes, for various
reasons, `adb` gets stuck. If it's not showing any connected devices or
otherwise failing, you can restart it by running:

adb kill-server
adb devices
adb kill-server && adb devices

Now, make sure Appium is running:

Expand All @@ -81,7 +80,6 @@ Then script your WebDriver test, sending in the following desired capabilities:
{
'device': 'Android',
'browserName': '',
'platform': 'MAC',
'version': '4.2',
'app': myApp,
'app-package': myAppPackage,
Expand All @@ -104,3 +102,34 @@ Using your WebDriver library of choice, set the remote session to use these
capabilities and connect to the server running at port 4723 of localhost (or
whatever host and port you specified when you started Appium). You should be
all set now!

<a name="run-selendroid"></a>Running your test app with Appium (Android devices
&lt; 4.2, and hybrid tests)
-----
Android devices before version 4.2 (API Level 17) do not have Google's
[UiAutomator
framework](developer.android.com/tools/help/uiautomator/index.html) installed.
This is what Appium uses to perform the
automation behaviors on the device. For earlier devices or tests of hybrid
(webview-based) apps, Appium comes bundled with another automation backend
called [Selendroid](http://selendroid.io/).

To use Selendroid, all that is required is to slightly change the set of
desired capabilities mentioned above, by replacing 'Android' with 'Selendroid':

```json
{
'device': 'Selendroid',
'browserName': '',
'version': '2.3',
'app': myApp,
'app-package': myAppPackage,
'app-activity': myAppActivity
}
```

Now Appium will start up a Selendroid test session instead of the default test
session. One of the downsides to using Selendroid is that its API differs
sometimes significantly with Appium's. Therefore we recommend you thoroughly
read [Selendroid's documentation](http://selendroid.io/native.html) before
writing your scripts for older devices or hybrid apps.

0 comments on commit d3539fb

Please sign in to comment.