-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 ContextMenu UITests from Xamarin.UITests to Appium #27403
[Testing] Enabling ContextMenu UITests from Xamarin.UITests to Appium #27403
Conversation
Hey there @NafeelaNazhir! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/// </summary> | ||
/// <param name="app">Represents the main gateway to interact with an app.</param> | ||
/// <param name="element">The element on which to perform the context action.</param> | ||
public static void ActivateContextMenu(this IApp app, string element) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Here in this PR #26204 we have actions with the same, although using internal commands from each native driver. That is, in Android a long press is done etc.
Although the result is the same, in case something changes by updating Appium and something becomes deprecated, I think it is better to have a class per platform and to use each driver directly.
} | ||
else | ||
{ | ||
app.TapCoordinates(150, 150); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better on the center of the screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsuarezruiz , As mentioned in the last comment, we will wait for the specified PR to be merged, then we will rebase and enable these test cases.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's push to merge #26204 and then, just rebase and use it in the added tests.
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Additionally introduced the ActivateContextMenu and DismissContextMenu methods in the HelperExtensions.cs file, aimed at improving the cross-platform testing approach by centralizing platform-specific logic into helper methods. The following changes have been made:
ActivateContextMenu:
A unified method to trigger platform-specific context actions on an element, simplifying context menu interactions across different platforms.
DismissContextMenu:
A single method to dismiss the context menu, eliminating the need for platform-specific code in test cases.
Android: Taps the back arrow to dismiss the menu.
Other platforms: Taps at coordinates (150, 150) to dismiss the menu.
TestCases