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] Enabling ported UITests from Xamarin.UITests to Appium - 3 #25734

Conversation

anandhan-rajagopal
Copy link
Contributor

@anandhan-rajagopal anandhan-rajagopal commented Nov 7, 2024

Description of Change

This PR focuses on re-enabling and updating following tests from the Xamarin.UITest framework to be compatible with Appium. The tests, previously commented out, are reviewed, and modified to ensure they are functional with the Appium framework. We are going to enable tests in blocks in different PRs. This is the second group of tests enabled.

Additonally the TapBackArrow method is an extension for the IApp interface, designed to facilitate back navigation in an Appium testing context across different platforms. This method checks the type of the app instance and invokes the appropriate back navigation command based on the platform:

Android: Simulates a tap on the navigation button using an XPath query to locate the button by its content description "Navigate up".
Windows, iOS and MacCatalyst: Taps on the "Back" button using an accessibility ID.

TestCases

  • Issue12126
  • Issue1024

@anandhan-rajagopal anandhan-rajagopal marked this pull request as ready for review November 7, 2024 15:55
@anandhan-rajagopal anandhan-rajagopal requested a review from a team as a code owner November 7, 2024 15:55
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 7, 2024
Copy link
Contributor

Hey there @anandhan-rajagopal! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz jsuarezruiz self-assigned this Nov 7, 2024
@jsuarezruiz
Copy link
Contributor

/rebase

@github-actions github-actions bot force-pushed the enable-navigationtests-from-xamarinuitests branch from b7aa55a to 4fdd98a Compare November 7, 2024 16:09
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz jsuarezruiz added the area-testing Unit tests, device tests label Nov 8, 2024
jsuarezruiz
jsuarezruiz previously approved these changes Nov 8, 2024
src/TestUtils/src/UITest.Appium/HelperExtensions.cs Outdated Show resolved Hide resolved
App.WaitForElement("TestReady");
App.TapBackArrow();
#if WINDOWS
App.WaitForElement("navViewItem");
Copy link
Member

Choose a reason for hiding this comment

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

@jsuarezruiz is there a way we can make this work so it doesn't have to be an if/def? Do we need some additional extensions for tabs? Do we need to add some automationids at the platform level?

Copy link
Contributor

@jsuarezruiz jsuarezruiz Nov 11, 2024

Choose a reason for hiding this comment

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

Is taking a few ms to render the tabs and for that reason wait to the parent

?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@anandhan-rajagopal Could you share more details on why you something different in Windows?

Copy link
Contributor Author

@anandhan-rajagopal anandhan-rajagopal Nov 13, 2024

Choose a reason for hiding this comment

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

@jsuarezruiz , In Windows, I'm encountering a timeout exception when using App.WaitForElement("Tab 1"), but using the x:Name for that element has worked successfully.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, applied changes to fix the problem and not require compilation directives in the test.
image

@dotnet dotnet deleted a comment from azure-pipelines bot Nov 19, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz jsuarezruiz requested a review from PureWeen November 21, 2024 08:38
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Fixed Back Button Code!

@PureWeen PureWeen merged commit e52d8a0 into dotnet:main Nov 22, 2024
108 checks passed
@anandhan-rajagopal anandhan-rajagopal added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 5, 2024
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 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants