-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat: Make it possible to start UIA2 server without an app or a package id #337
Conversation
@@ -190,12 +190,14 @@ class AndroidUiautomator2Driver extends BaseDriver { | |||
// find and copy, or download and unzip an app url or path | |||
this.opts.app = await this.helpers.configureApp(this.opts.app, [APK_EXTENSION, APKS_EXTENSION]); | |||
await this.checkAppPresent(); | |||
} else if (this.appOnDevice) { | |||
} else if (this.opts.appPackage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this driver now take the appPackage
from the app
capability if it is there? Why not continue using this.appOnDevice
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appOnDevice
was a blind copy paste from AndroidDriver, which is not even assigned anywhere in UIA2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this driver now take the appPackage from the app capability if it is there?
It was always like that:
// get appPackage et al from manifest if necessary
const appInfo = await helpers.getLaunchInfo(this.adb, this.opts);
// and get it onto our 'opts' object so we use it from now on
Object.assign(this.opts, appInfo || {});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Getters don't get assigned like functions do. Alas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add this no app/appPackage case in https://github.com/appium/appium/blob/master/docs/en/drivers/android-uiautomator2.md
No description provided.