Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#319 fix #326

Merged
merged 7 commits into from
Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.appium.java_client.remote;


import org.openqa.selenium.remote.CapabilityType;

/**
* The list of Android-specific capabilities
* Read: https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#android-only
*/
public interface AndroidMobileCapabilityType extends CapabilityType {
/**
* Activity name for the Android activity you want to launch from your package. This often needs to be preceded
* by a . (e.g., .MainActivity instead of MainActivity)
*/
String APP_ACTIVITY = "appActivity";

/**
* Java package of the Android app you want to run
*/
String APP_PACKAGE = "appPackage";

/**
* Activity name for the Android activity you want to wait for
*/
String APP_WAIT_ACTIVITY = "appWaitActivity";

/**
* Java package of the Android app you want to wait for
*/
String APP_WAIT_PACKAGE = "appWaitPackage";

/**
* Timeout in seconds while waiting for device to become ready
*/
String DEVICE_READY_TIMEOUT = "deviceReadyTimeout";

/**
* Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w
*/
String ANDROID_COVERAGE = "androidCoverage";

/**
* (Chrome and webview only) Enable Chromedriver's performance logging (default false)
*/
String ENABLE_PERFORMANCE_LOGGING = "enablePerformanceLogging";

/**
* Timeout in seconds used to wait for a device to become ready after booting
*/
String ANDROID_DEVICE_READY_TIMEOUT = "androidDeviceReadyTimeout";

/**
* Port used to connect to the ADB server (default 5037)
*/
String ADB_PORT = "adbPort";

/**
* Devtools socket name. Needed only when tested app is a Chromium embedding browser.
* The socket is open by the browser and Chromedriver connects to it as a devtools client.
*/
String ANDROID_DEVICE_SOCKET = "androidDeviceSocket";

/**
* Name of avd to launch
*/
String AVD = "avd";

/**
* How long to wait in milliseconds for an avd to launch and connect to ADB (default 120000)
*/
String AVD_LAUNCH_TIMEOUT = "avdLaunchTimeout";

/**
* How long to wait in milliseconds for an avd to finish its boot animations (default 120000)
*/
String AVD_READY_TIMEOUT = "avdReadyTimeout";

/**
* Additional emulator arguments used when launching an avd
*/
String AVD_ARGS = "avdArgs";

/**
* Use a custom keystore to sign apks, default false
*/
String USE_KEYSTORE = "useKeystore";

/**
* Path to custom keystore, default ~/.android/debug.keystore
*/
String KEYSTORE_PATH = "keystorePath";

/**
* Password for custom keystore
*/
String KEYSTORE_PASSWORD = "keystorePassword";

/**
* Alias for key
*/
String KEY_ALIAS = "keyAlias";

/**
* Password for key
*/
String KEY_PASSWORD = "keyPassword";

/**
* The absolute local path to webdriver executable (if Chromium embedder provides its own webdriver,
* it should be used instead of original chromedriver bundled with Appium)
*/
String CHROMEDRIVER_EXECUTABLE = "chromedriverExecutable";

/**
* Amount of time to wait for Webview context to become active, in ms. Defaults to 2000
*/
String AUTO_WEBVIEW_TIMEOUT = "autoWebviewTimeout";

/**
* Intent action which will be used to start activity (default android.intent.action.MAIN)
*/
String INTENT_ACTION = "intentAction";

/**
* Intent category which will be used to start activity (default android.intent.category.LAUNCHER)
*/
String INTENT_CATEGORY = "intentCategory";

/**
* Flags that will be used to start activity (default 0x10200000)
*/
String INTENT_FLAGS = "intentFlags";

/**
* Additional intent arguments that will be used to start activity. See Intent arguments:
* http://developer.android.com/tools/help/adb.html#IntentSpec
*/
String OPTIONAL_INTENT_ARGUMENTS = "optionalIntentArguments";

/**
* 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
*/
String DONT_STOP_APP_ON_RESET = "dontStopAppOnReset";

/**
* Enable Unicode input, default false
*/
String UNICODE_KEYBOARD = "unicodeKeyboard";

/**
* Reset keyboard to its original state, after running Unicode tests with unicodeKeyboard capability.
* Ignored if used alone. Default false
*/
String RESET_KEYBOARD = "resetKeyboard";

/**
* Skip checking and signing of app with debug keys, will work only with
* UiAutomator and not with selendroid, default false
*/
String NO_SIGN = "noSign";

/**
* Calls the setCompressedLayoutHierarchy() uiautomator function. This capability can speed up test execution,
* since Accessibility commands will run faster ignoring some elements. The ignored elements will not be findable,
* which is why this capability has also been implemented as a toggle-able setting as well as a capability.
* Defaults to false
*/
String IGNORE_UNIMPORTANT_VIEWS = "ignoreUnimportantViews";

/**
* Disables android watchers that watch for application not responding and application crash,
* this will reduce cpu usage on android device/emulator. This capability will work only with
* UiAutomator and not with selendroid, default false
*/
String DISABLE_ANDROID_WATCHERS = "disableAndroidWatchers";

/**
* Allows passing chromeOptions capability for ChromeDriver. For more information see chromeOptions:
* https://sites.google.com/a/chromium.org/chromedriver/capabilities
*/
String CHROME_OPTIONS = "chromeOptions";

/**
* Kill ChromeDriver session when moving to a non-ChromeDriver webview. Defaults to false
*/
String RECREATE_CHROME_DRIVER_SESSIONS = "recreateChromeDriverSessions";

String SELENDROID_PORT = "selendroidPort";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.appium.java_client.remote;

import org.openqa.selenium.remote.CapabilityType;

/**
* The list of iOS-specific capabilities
* Read: https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#ios-only
*/
public interface IOSMobileCapabilityType extends CapabilityType {

/**
* (Sim-only) Calendar format to set for the iOS Simulator
*/
String CALENDAR_FORMAT = "calendarFormat";

/**
* Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require
* the bundle ID during test startup. To run a test on a real device using the bundle ID,
* you may omit the 'app' capability, but you must provide 'udid'.
*/
String BUNDLE_ID = "bundleId";

/**
* Amount of time in ms to wait for instruments before assuming it hung and failing the session
*/
String LAUNCH_TIMEOUT = "launchTimeout";

/**
* (Sim-only) Force location services to be either on or off. Default is to keep current sim setting.
*/
String LOCATION_SERVICES_ENABLED = "locationServicesEnabled";

/**
* (Sim-only) Set location services to be authorized or not authorized for app via plist, so that location services
* alert doesn't pop up. Default is to keep current sim setting. Note that
* if you use this setting you MUST also use the bundleId capability to send in your app's bundle ID.
*/
String LOCATION_SERVICES_AUTHORIZED = "locationServicesAuthorized";

/**
* Accept all iOS alerts automatically if they pop up. This includes privacy access permission alerts
* (e.g., location, contacts, photos). Default is false.
*/
String AUTO_ACCEPT_ALERTS = "autoAcceptAlerts";

/**
* Dismiss all iOS alerts automatically if they pop up.
* This includes privacy access permission alerts (e.g.,
* location, contacts, photos). Default is false.
*/
String AUTO_DISMISS_ALERTS = "autoDismissAlerts";

/**
* Use native intruments lib (ie disable instruments-without-delay).
*/
String NATIVE_INSTRUMENTS_LIB = "nativeInstrumentsLib";

/**
* (Sim-only) Enable "real", non-javascript-based web taps in Safari.
* Default: false.
* Warning: depending on viewport size/ratio this might not accurately tap an element
*/
String NATIVE_WEB_TAP = "nativeWebTap";

/**
* (Sim-only) (>= 8.1) Initial safari url, default is a local welcome page
*/
String SAFARI_INITIAL_URL = "safariInitialUrl";

/**
* (Sim-only) Allow javascript to open new windows in Safari. Default keeps current sim setting
*/
String SAFARI_ALLOW_POPUPS = "safariAllowPopups";

/**
* (Sim-only) Prevent Safari from showing a fraudulent website warning. Default keeps current sim setting.
*/
String SAFARI_IGNORE_FRAUD_WARNING = "safariIgnoreFraudWarning";

/**
* (Sim-only) Whether Safari should allow links to open in new windows. Default keeps current sim setting.
*/
String SAFARI_OPEN_LINKS_IN_BACKGROUND = "safariOpenLinksInBackground";

/**
* (Sim-only) Whether to keep keychains (Library/Keychains) when appium session is started/finished
*/
String KEEP_KEY_CHAINS = "keepKeyChains";

/**
* Where to look for localizable strings. Default en.lproj
*/
String LOCALIZABLE_STRINGS_DIR = "localizableStringsDir";

/**
* Arguments to pass to the AUT using instruments
*/
String PROCESS_ARGUMENTS = "processArguments";

/**
* The delay, in ms, between keystrokes sent to an element when typing.
*/
String INTER_KEY_DELAY = "interKeyDelay";

/**
* Whether to show any logs captured from a device in the appium logs. Default false
*/
String SHOW_IOS_LOG = "showIOSLog";

/**
* strategy to use to type test into a test field. Simulator default: oneByOne. Real device default: grouped
*/
String SEND_KEY_STRATEGY = "sendKeyStrategy";

/**
* Max timeout in sec to wait for a screenshot to be generated. default: 10
*/
String SCREENSHOT_WAIT_TIMEOUT = "screenshotWaitTimeout";

/**
* The ios automation script used to determined if the app has been launched,
* by default the system wait for the page source not to be empty. The result must be a boolean
*/
String WAIT_FOR_APP_SCRIPT = "waitForAppScript";

/**
* Number of times to send connection message to remote debugger, to get webview. Default: 8
*/
String WEBVIEW_CONNECT_RETRIES = "webviewConnectRetries";

/**
* The display name of the application under test. Used to automate backgrounding the app in iOS 9+.
*/
String APP_NAME = "appName";
}
Loading