diff --git a/README.md b/README.md index e6ec6764725..10904e15c74 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/running-tests.md b/docs/running-tests.md index 992cea5a68b..559c2b5abf6 100644 --- a/docs/running-tests.md +++ b/docs/running-tests.md @@ -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: @@ -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, @@ -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! + +Running your test app with Appium (Android devices +< 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.