From 90a1e772ee0c1e42c7dd586830ccf22457d75812 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sun, 28 Jul 2019 11:41:17 +0900 Subject: [PATCH 1/2] feat: add a capability of waitForLaunch --- lib/desired-caps.js | 3 +++ lib/driver.js | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/desired-caps.js b/lib/desired-caps.js index f5c306cc4..631fe4830 100644 --- a/lib/desired-caps.js +++ b/lib/desired-caps.js @@ -37,6 +37,9 @@ let uiautomatorCapConstraints = { }, androidCoverageEndIntent: { isString: true + }, + appWaitForLaunch: { + isBoolean: true } }; diff --git a/lib/driver.js b/lib/driver.js index ae6c08202..8d1b16adb 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -479,6 +479,7 @@ class AndroidUiautomator2Driver extends BaseDriver { flags: this.opts.intentFlags, waitPkg: this.opts.appWaitPackage, waitActivity: this.opts.appWaitActivity, + waitForLaunch: this.opts.appWaitForLaunch, optionalIntentArguments: this.opts.optionalIntentArguments, stopApp: !this.opts.dontStopAppOnReset, retry: true From 2057b65c076348b92d1c938e5cc6e3c107e55684 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sun, 28 Jul 2019 17:03:53 +0900 Subject: [PATCH 2/2] catch another keywords --- test/functional/commands/general/mobile-command-e2e-specs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/commands/general/mobile-command-e2e-specs.js b/test/functional/commands/general/mobile-command-e2e-specs.js index 864199ae9..1cdce6e9c 100644 --- a/test/functional/commands/general/mobile-command-e2e-specs.js +++ b/test/functional/commands/general/mobile-command-e2e-specs.js @@ -28,7 +28,7 @@ describe('mobile', function () { try { await driver.execute('mobile: shell', {command: 'echo', args: ['hello']}); } catch (e) { - e.message.should.match(/Original error: Appium server must have relaxed security flag set in order to run any shell commands/); + e.message.should.match(/Potentially insecure feature 'adb_shell' has not been enabled/); } }); });