mirror of
https://github.com/appium/appium.git
synced 2026-05-24 21:08:51 -05:00
@@ -89,7 +89,7 @@ during a Safari automation session, we're allowed to use JavaScript to open
|
||||
up new windows. See the [capabilities doc](/docs/en/writing-running-appium/caps.md) for the complete list of capabilities available for Appium.
|
||||
|
||||
**Appium Server**<br/>
|
||||
Appium is a server written in Node.js. It can be built and installed [from source](github.com/appium/appium) or installed directly from NPM:
|
||||
Appium is a server written in Node.js. It can be built and installed [from source](https://github.com/appium/appium/blob/master/docs/en/contributing-to-appium/appium-from-source.md) or installed directly from NPM:
|
||||
```
|
||||
$ npm install -g appium
|
||||
$ appium
|
||||
|
||||
@@ -38,7 +38,7 @@ instructions.
|
||||
* Versions: 2.3 and up
|
||||
* Versions 2.3 through 4.2 are supported via Appium's bundled version of
|
||||
[Selendroid](http://selendroid.io), which utilizes [Instrumentation](http://developer.android.com/reference/android/app/Instrumentation.html). Selendroid has a different set of commands than the default Appium (though this is rapidly being minimized) and a different support profile. To access this automation backend, use the `automationName` capability with the value `Selendroid`.
|
||||
* Versions 4.2 and up are supported via Appium's own [UiAutomator](http://developer.android.com/tools/help/uiautomator/index.html)
|
||||
* Versions 4.2 and up are supported via Appium's own [UiAutomator](http://developer.android.com/tools/testing-support-library/index.html#UIAutomator)
|
||||
libraries. This is the default automation backend.
|
||||
* Devices: Android emulators and real Android devices
|
||||
* Native app support: Yes
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|`intentAction`| Intent action which will be used to start activity (default `android.intent.action.MAIN`)| e.g.`android.intent.action.MAIN`, `android.intent.action.VIEW`|
|
||||
|`intentCategory`| Intent category which will be used to start activity (default `android.intent.category.LAUNCHER`)| e.g. `android.intent.category.LAUNCHER`, `android.intent.category.APP_CONTACTS`
|
||||
|`intentFlags`| Flags that will be used to start activity (default `0x10200000`)| e.g. `0x10200000`
|
||||
|`optionalIntentArguments`| Additional intent arguments that will be used to start activity. See [Intent arguments](http://developer.android.com/tools/help/adb.html#IntentSpec) | e.g. `--esn <EXTRA_KEY>`, `--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>`, etc.
|
||||
|`optionalIntentArguments`| Additional intent arguments that will be used to start activity. See [Intent arguments](http://developer.android.com/reference/android/content/Intent.html) | e.g. `--esn <EXTRA_KEY>`, `--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>`, etc.
|
||||
|`dontStopAppOnReset`| Doesn't stop the process of the app under test, before starting the app using adb. If the app under test is created by another anchor app, setting this false, allows the process of the anchor app to be still alive, during the start of the test app using adb. In other words, with `dontStopAppOnReset` set to `true`, we will not include the `-S` flag in the `adb shell am start` call. With this capability omitted or set to `false`, we include the `-S` flag. Default `false`| `true` or `false`|
|
||||
|`unicodeKeyboard`| Enable Unicode input, default `false`| `true` or `false`|
|
||||
|`resetKeyboard`| Reset keyboard to its original state, after running Unicode tests with `unicodeKeyboard` capability. Ignored if used alone. Default `false`| `true` or `false`|
|
||||
|
||||
@@ -9,7 +9,7 @@ It is worth looking at *'-ios uiautomation'* search strategy with **Predicates**
|
||||
```
|
||||
|
||||
Native JS search strategy (powered by Apple) provides much more flexibility and is like Xpath.
|
||||
**[Predicates](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/predicates.html)** can be used to restrict an elements set to select only those ones for which some condition is true.
|
||||
**[Predicates](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html)** can be used to restrict an elements set to select only those ones for which some condition is true.
|
||||
|
||||
For example:
|
||||
|
||||
@@ -20,7 +20,7 @@ appiumDriver.findElementsByIosUIAutomation("collectionViews()[0].cells().withPre
|
||||
|
||||
\- will select only those ```UIACollectionCell``` elements that have visible ```UIAStaticText``` child elements, and themselves are childs of 1st ```UIACollectionView``` element that should be located under the main app window. Here ```staticTexts()``` and ```isVisible()``` are methods available in ```UIAElementArray``` and ```UIAElement``` classes respectively. **Note that ```UIAElementArray``` numbering begins with ```0``` unlike Xpath where indexes counting starts from ```1```**
|
||||
|
||||
Here's a list of available Predicates (mostly taken from [Predicates Programming Guide](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/predicates.html))
|
||||
Here's a list of available Predicates (mostly taken from [Predicates Programming Guide](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html))
|
||||
|
||||
### Basic Comparisons
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ First, make sure you have one and only one Android emulator or device
|
||||
connected. If you run `adb devices`, for example, you should see one device
|
||||
connected. This is the device Appium will use for tests. Of course, to have
|
||||
a device connected, you'll need to have made an Android AVD (see system
|
||||
setup ([Windows](running-on-windows.md),
|
||||
[Mac](running-on-osx.md),
|
||||
or [Linux](running-on-linux.md))
|
||||
setup ([Windows](https://github.com/appium/appium/blob/master/docs/en/appium-setup/running-on-windows.md),
|
||||
[Mac](https://github.com/appium/appium/blob/master/docs/en/appium-setup/running-on-osx.md),
|
||||
or [Linux](https://github.com/appium/appium/blob/master/docs/en/appium-setup/running-on-linux.md))
|
||||
for more information). If the Android SDK tools are on your path, you can
|
||||
simply run:
|
||||
|
||||
@@ -196,7 +196,7 @@ 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](http://developer.android.com/tools/help/uiautomator/index.html)
|
||||
[UiAutomator framework](http://developer.android.com/tools/testing-support-library/index.html#UIAutomator)
|
||||
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]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## uiautomator UiSelector
|
||||
|
||||
Appium enables searching using [UiSelectors](http://developer.android.com/tools/help/uiautomator/UiSelector.html).
|
||||
[UiScrollable](http://developer.android.com/tools/help/uiautomator/UiScrollable.html)
|
||||
Appium enables searching using [UiSelectors](http://developer.android.com/reference/android/support/test/uiautomator/UiSelector.html).
|
||||
[UiScrollable](http://developer.android.com/reference/android/support/test/uiautomator/UiScrollable.html)
|
||||
is also supported.
|
||||
|
||||
Note that the index selector is unreliable so prefer instance instead. The
|
||||
|
||||
Reference in New Issue
Block a user