Additional changes of the #473 by TikhomirovSergey · Pull Request #786 · appium/java-client
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 You can take a look at this PR and review it too.
| 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 :)
| 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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mykola-mokhnach I tried with AutoGrantPermissions Caps and output is same on both UIA1/UIA2. Is it the same caps you are talking about?
@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.
| 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.
| 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 👍
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters