Additional changes of the #473 by TikhomirovSergey · Pull Request #786 · appium/java-client

@TikhomirovSergey

Change list

Additional changes of the #473

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

  • AuthenticatesByFinger was added to io.appium.java_client.android
  • Some improvements of the FingerPrintTest

@alizelzele

 into alizelzele-finger-print
- AuthenticatesByFinger was added to `io.appium.java_client.android`
- Some improvements of the FingerPrintTest

@TikhomirovSergey

@alizelzele You can take a look at this PR and review it too.

mykola-mokhnach

service = AppiumDriverLocalService.buildDefaultService();
service.start();

if (service == null || !service.isRunning()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

service cannot be null here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mykola-mokhnach it was copied from BaseAndroidTest and for sure it can not be null here :)

mykola-mokhnach

enterPasswordAndContinue(driver);
enterPasswordAndContinue(driver);
clickNext(driver);
driver.quit();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather move driver create/quit into before/after each method

SrinivasanTarget

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mykola-mokhnach

@SrinivasanTarget

@mykola-mokhnach I tried with AutoGrantPermissions Caps and output is same on both UIA1/UIA2. Is it the same caps you are talking about?

@TikhomirovSergey

@SrinivasanTarget

@alizelzele

@SrinivasanTarget since we are not using any test app and android changed its settings implementation on different APIs. I didn't find any other way to implement this test.

@TikhomirovSergey

@TikhomirovSergey

@TikhomirovSergey

SrinivasanTarget

driver.fingerPrint(2);
try {
clickNext(driver);
driver.findElementById("com.android.settings:id/next_button").click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be clickNext()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Will improve today.

alizelzele

text.equals(androidElement.getText())).findFirst()
.orElseThrow(() ->
new NoSuchElementException(String.format("There is no element with the text '%s'", text)));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was so used to localization testing that my mind automatically blocked using text to find an element :)
using text is much better and easier in this case 👍

@TikhomirovSergey

@TikhomirovSergey

SrinivasanTarget

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@TikhomirovSergey

@SrinivasanTarget

@alizelzele