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

Testing Biometrics features #7

Closed
kubawojtczakLC opened this issue May 25, 2022 · 9 comments
Closed

Testing Biometrics features #7

kubawojtczakLC opened this issue May 25, 2022 · 9 comments
Labels
epic Idea for a big new feature

Comments

@kubawojtczakLC
Copy link
Member

No description provided.

@bartekpacia bartekpacia added the epic Idea for a big new feature label Jul 18, 2022
@bartekpacia
Copy link
Contributor

Android:

  • fingerprint
  • iris scanner
  • some Face ID-ish systems

Additional problem: many, many vendors.

iOS:

  • Touch ID
  • Face ID

@JulianBissekkou
Copy link

Is this on some roadmap to be implemented soon?
We are currently evaluating if this framework can be used and biometrics would be a feature that is nice (but urgent required)

So far this lib looks amazing, keep pushing guys 💪🏽

@bartekpacia
Copy link
Contributor

Hello @JulianBissekkou! Glad you like Patrol 💙

Is this on some roadmap to be implemented soon?

We'll share our roadmap with the community soon, and researching biometrics should be there, but I'm not sure what priority it has. I'll ping you here when it happens.

@bartekpacia bartekpacia changed the title Biometrics Research testing Biometrics features Jan 29, 2023
@bartekpacia bartekpacia changed the title Research testing Biometrics features Testing Biometrics features Jan 29, 2023
@mzdm
Copy link

mzdm commented Feb 9, 2023

I was able to activate biometry settings via PIN (emulator) however I'm stuck on this screen because there is no "Confirm" button. If someone finds a workaround for this please let me know!

  // Setting up biometry from Security settings
  await $.native.tap(Selector(text: 'Screen lock'));
  await $.native.tap(Selector(text: 'PIN'));

  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(text: 'NEXT'));
  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(text: 'CONFIRM'));
  await Future.delayed(Duration(seconds: 1));
  await $.native.tap(Selector(text: 'DONE'));

  // Biometry set up, go back to app
  await $.native.pressBack();

  final loginButton = find.text('Aktivovat');
  await tester.pumpUntilFound(loginButton);
  await tester.tap(loginButton);

  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(className: 'android.widget.EditText'));   // Stuck on biometry PIN validation screen (see screenshot) because there is no button and no way to send "ENTER" key

@bartekpacia
Copy link
Contributor

@mzdm You can try taking a native view hierarchy dump and trying to find the "->|" (continue) button there. Maybe it has some unique resource-id that you can use.

@mzdm
Copy link

mzdm commented Feb 9, 2023

@mzdm You can try taking a native view hierarchy dump and trying to find the "->|" (continue) button there. Maybe it has some unique resource-id that you can use.

I tried but unfortunately "->|" seems to be a part of the keyboard which is not included in the native hierarchy tree

Code
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<hierarchy rotation="0">
    <node bounds="[0,66][1080,2088]" checkable="false" checked="false" class="android.widget.LinearLayout"
        clickable="false" content-desc="" enabled="true" focusable="true"
        focused="false" index="0" long-clickable="false" package="com.android.systemui" password="false"
        resource-id="" scrollable="false" selected="false" text="">
        <node bounds="[0,66][1080,2088]" checkable="false" checked="false"
            class="android.widget.FrameLayout" clickable="false" content-desc=""
            enabled="true" focusable="false" focused="false" index="0" long-clickable="false"
            package="com.android.systemui" password="false" resource-id="com.android.systemui:id/layout" scrollable="false"
            selected="false" text="">
            <node bounds="[0,66][1080,2088]" checkable="false" checked="false"
                class="android.widget.ImageView" clickable="true"
                content-desc="Tap to cancel authentication" enabled="true" focusable="true"
                focused="false" index="0" long-clickable="false" package="com.android.systemui" password="false"
                resource-id="com.android.systemui:id/background" scrollable="false" selected="false"
                text="" />
            <node bounds="[0,66][1080,2088]" checkable="false" checked="false"
                class="android.view.View" clickable="false" content-desc=""
                enabled="true" focusable="false" focused="false" index="1" long-clickable="false"
                package="com.android.systemui" password="false" resource-id="com.android.systemui:id/panel" scrollable="false"
                selected="false" text="" />
            <node bounds="[0,66][1080,2088]" checkable="false" checked="false" class="android.widget.LinearLayout"
                clickable="false" content-desc="" enabled="true" focusable="false"
                focused="false" index="2" long-clickable="false" package="com.android.systemui"
                password="false" resource-id="" scrollable="false" selected="false"
                text="">
                <node bounds="[496,294][584,382]" checkable="false" checked="false"
                    class="android.widget.ImageView" clickable="false" content-desc=""
                    enabled="true" focusable="false" focused="false" index="0"
                    long-clickable="false" package="com.android.systemui" password="false" resource-id="com.android.systemui:id/icon"
                    scrollable="false" selected="false" text="" />
                <node bounds="[0,382][1080,503]" checkable="false"
                    checked="false" class="android.widget.TextView"
                    clickable="false" content-desc="" enabled="true" focusable="false"
                    focused="false" index="1" long-clickable="false" package="com.android.systemui"
                    password="false" resource-id="com.android.systemui:id/title" scrollable="false" selected="false"
                    text="Prosím, authentizujte se" />
                <node bounds="[254,731][826,876]" checkable="false" checked="false"
                    class="android.widget.EditText" clickable="true" content-desc=""
                    enabled="true" focusable="true" focused="true" index="2"
                    long-clickable="true" package="com.android.systemui" password="true" resource-id="com.android.systemui:id/lockPassword"
                    scrollable="false" selected="false" text="•••••" />
                <node bounds="[0,876][1080,946]" checkable="false" checked="false"
                    class="android.widget.TextView" clickable="false" content-desc=""
                    enabled="true" focusable="false" focused="false" index="3"
                    long-clickable="false" package="com.android.systemui" password="false" resource-id="com.android.systemui:id/error"
                    scrollable="false" selected="false" text="" />
            </node>
        </node>
    </node>
</hierarchy>

@sebastianbuechler
Copy link

I was able to activate biometry settings via PIN (emulator) however I'm stuck on this screen because there is no "Confirm" button. If someone finds a workaround for this please let me know!

  // Setting up biometry from Security settings
  await $.native.tap(Selector(text: 'Screen lock'));
  await $.native.tap(Selector(text: 'PIN'));

  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(text: 'NEXT'));
  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(text: 'CONFIRM'));
  await Future.delayed(Duration(seconds: 1));
  await $.native.tap(Selector(text: 'DONE'));

  // Biometry set up, go back to app
  await $.native.pressBack();

  final loginButton = find.text('Aktivovat');
  await tester.pumpUntilFound(loginButton);
  await tester.tap(loginButton);

  await $.native.enterTextByIndex('1234', index: 0);
  await $.native.tap(Selector(className: 'android.widget.EditText'));   // Stuck on biometry PIN validation screen (see screenshot) because there is no button and no way to send "ENTER" key

Did you find a solution for continuing with PIN?

@bartekpacia
Copy link
Contributor

As for the Enter key: we could do this with UiDevice#pressEnter() on Android.

See also #1516.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
epic Idea for a big new feature
Projects
None yet
Development

No branches or pull requests

6 participants