Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Plugin.Maui.UITestHelpers.Appium/HelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,16 @@ public static bool IsFocused(this IApp app, string id)
return element.AppiumElement.Equals(activeElement);
}

/// <summary>
/// Return the current page source of the displayed view.
/// Useful to inspect the current view hierarchy and its automation ids.
/// </summary>
public static string? GetNativePageSource(this IApp app)
{
var tree = (app as AppiumApp)?.Driver.PageSource;
return tree;
}

static IUIElement Wait(Func<IUIElement?> query,
Func<IUIElement?, bool> satisfactory,
string? timeoutMessage = null,
Expand Down