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] Need reliable validation support to ensure the KeyboardType in Appium #26968

Open
anandhan-rajagopal opened this issue Jan 6, 2025 · 2 comments · May be fixed by #27113
Open

[Testing] Need reliable validation support to ensure the KeyboardType in Appium #26968

anandhan-rajagopal opened this issue Jan 6, 2025 · 2 comments · May be fixed by #27113
Assignees
Labels
area-testing Unit tests, device tests t/bug Something isn't working testing-flakiness
Milestone

Comments

@anandhan-rajagopal
Copy link
Contributor

anandhan-rajagopal commented Jan 6, 2025

Description

Tests for TableViewEntryCellShowsDefaultKeyboardThenNumericKeyboardAfterScrolling (Bugzilla33578) were failing on Android and iOS. Due to cursor blinking for entry, some time the image generated with cursor and without cursor sometimes. so need a proper validation helper method for verify the keyboard type in Appium as like XamarinUITest. Eg. Need a helper extension like detect the virtual keyboard type.

Steps to Reproduce

No response

Link to public reproduction project repository

https://dev.azure.com/xamarin/public/_build/results?buildId=131498&view=ms.vss-test-web.build-test-results-tab&runId=3545447&resultId=100043&paneView=debug

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android, iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: TableViewEntryCellShowsNumberKeyboard.png (1.16% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.


More info: https://aka.ms/visual-test-workflow
@anandhan-rajagopal anandhan-rajagopal added the t/bug Something isn't working label Jan 6, 2025
@anandhan-rajagopal anandhan-rajagopal self-assigned this Jan 6, 2025
@anandhan-rajagopal anandhan-rajagopal changed the title [Testing] Need to improve the Bugzilla33578 tests which fails due to uncertain cursor visibility. [Testing] Need reliable validation support to ensure the KeyboardType in Appium Jan 6, 2025
@mattleibow mattleibow added this to the Backlog milestone Jan 6, 2025
@mattleibow mattleibow added area-testing Unit tests, device tests testing-flakiness labels Jan 6, 2025
@jsuarezruiz jsuarezruiz self-assigned this Jan 13, 2025
@jsuarezruiz
Copy link
Contributor

Could you share more details? Which Xamarin.UITest option are you referring to? A link to the Xamarin.UITest documentation or similar for example would be sufficient.

There are different approaches that can be taken:

  • Use Mapper to remove Entry/Editor etc cursor in the UITests sample, which is not always wanted, so I would rule this option out.
  • Pass parameters when trigger the LaunchApp method and only remove the cursor when the parameter is passed.
  • Create a NoCursorEntry etc, inside a Controls folder available in the UITests project. This way, when you want to take screenshots you can use these controls.
  • Using Appium might be possible, although not in all situations. Two methods can be created, a pre-verifysnapshot where the element with focus is accessed, and from there the focus is moved to the next control (if there is only one Entry, for example, it would not be possible and moving the focus to the parent element would have no effect. While in XF tapping on a Layout removed the focus, this does not happen in .NET MAUI). And a post-verifysnapshot to restore the focus state. So I would rule out this option.

@jsuarezruiz
Copy link
Contributor

@PureWeen Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests t/bug Something isn't working testing-flakiness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants