mirror of
https://github.com/appium/appium.git
synced 2026-02-11 12:29:48 -06:00
Added arguments for intent options.
This commit is contained in:
@@ -87,12 +87,8 @@ androidCommon.setAndroidArgs = function () {
|
||||
this.args.appActivity;
|
||||
this.appProcess = this.args.appPackage;
|
||||
this.args.appDeviceReadyTimeout = this.args.androidDeviceReadyTimeout;
|
||||
// TODO better way to set defaults.
|
||||
this.args.avdLaunchTimeout = this.args.avdLaunchTimeout || 120000;
|
||||
this.args.avdReadyTimeout = this.args.avdReadyTimeout || 120000;
|
||||
this.args.intentAction = this.args.intentAction || "android.intent.action.MAIN";
|
||||
this.args.intentCategory = this.args.intentCategory || "android.intent.category.LAUNCHER";
|
||||
this.args.intentFlags = this.args.intentFlags || "0x10200000";
|
||||
};
|
||||
|
||||
androidCommon.background = function (secs, cb) {
|
||||
|
||||
@@ -511,8 +511,40 @@ var args = [
|
||||
, help: 'Absolute path to directory Appium can use to manage temporary ' +
|
||||
'files, like built-in iOS apps it needs to move around. On *nix/Mac ' +
|
||||
'defaults to /tmp, on Windows defaults to C:\\Windows\\Temp'
|
||||
}]
|
||||
}],
|
||||
|
||||
[['--intent-action'], {
|
||||
dest: 'intentAction'
|
||||
, defaultValue: "android.intent.action.MAIN"
|
||||
, required: false
|
||||
, example: "android.intent.action.MAIN"
|
||||
, help: "(Android-only) Intent action which will be used to start activity"
|
||||
}],
|
||||
|
||||
[['--intent-category'], {
|
||||
dest: 'intentCategory'
|
||||
, defaultValue: "android.intent.category.LAUNCHER"
|
||||
, required: false
|
||||
, example: "android.intent.category.APP_CONTACTS"
|
||||
, help: "(Android-only) Intent category which will be used to start activity"
|
||||
}],
|
||||
|
||||
[['--intent-flags'], {
|
||||
dest: 'intentFlags'
|
||||
, defaultValue: "0x10200000"
|
||||
, required: false
|
||||
, example: "0x10200000"
|
||||
, help: "(Android-only) Flags that will be used to start activity"
|
||||
}],
|
||||
|
||||
[['--intent-args'], {
|
||||
dest: 'optionalIntentArguments'
|
||||
, defaultValue: null
|
||||
, required: false
|
||||
, example: "0x10200000"
|
||||
, help: "(Android-only) Additional intent arguments that will be used to " +
|
||||
"start activity"
|
||||
}]
|
||||
];
|
||||
|
||||
// Setup all the command line argument parsing
|
||||
|
||||
Reference in New Issue
Block a user