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

feat: Make it possible to start UIA2 server without an app or a package id #337

Merged
merged 4 commits into from Sep 9, 2019

Conversation

@mykola-mokhnach
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach commented Sep 9, 2019

No description provided.

@@ -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) {
Copy link
Contributor

@imurchie imurchie Sep 9, 2019

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?

Copy link
Contributor Author

@mykola-mokhnach mykola-mokhnach Sep 9, 2019

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

Copy link
Contributor Author

@mykola-mokhnach mykola-mokhnach Sep 9, 2019

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 || {});

Copy link
Contributor

@imurchie imurchie Sep 9, 2019

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.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

@mykola-mokhnach mykola-mokhnach merged commit b630545 into appium:master Sep 9, 2019
5 of 7 checks passed
@mykola-mokhnach mykola-mokhnach deleted the no_id branch Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants