dotnet add package XamlTreeDump --version 1.0.10
NuGet\Install-Package XamlTreeDump -Version 1.0.10
<PackageReference Include="XamlTreeDump" Version="1.0.10" />
paket add XamlTreeDump --version 1.0.10
#r "nuget: XamlTreeDump, 1.0.10"
// Install XamlTreeDump as a Cake Addin #addin nuget:?package=XamlTreeDump&version=1.0.10 // Install XamlTreeDump as a Cake Tool #tool nuget:?package=XamlTreeDump&version=1.0.10
A UWP library to produce and compare XAML tree dumps useful for visual end-to-end testing
XamlTreeDump can be used to produce a data representation of a UWP XAML UI ("tree dump") and compare it to a checked-in version ("master") to detect regressions in visual output.
There are two main entrypoints to the library:
public static string VisualTreeDumper.DumpTree( DependencyObject root, DependencyObject excludeNode, IVector<string> additionalProperties, DumpTreeMode mode)
This will traverse the tree starting at the root, skipping the optional
excludeNode, and collect a set of standard properties - which you can add to through
additionalProperties. The format of the dump can be switched between
key=value text format), or the recommended
The string you receive from
DumpTree can be saved to a file so that your test application can later use
TreeDumpHelper.DumpsAreEqual to check for differences.
The second entrypoint:
public static bool TreeDumpHelper.DumpsAreEqual(string expected, string actual)
will perform a semantic comparison of the two dumps by following these rules:
- any property with a string value of
<ANYTHING>in the master will match any value in the output regardless of its type.
- numbers are compared to within a precision of 1.0f
DependencyObjects with a
Visibility == Collapsedwill be compared as if they do not exist
ScrollBartypes will be ignored (since UI automation can sometimes hover over them and trigger them on accident)
See UnitTests for more usage and examples.
|Product||Versions Compatible and additional computed target framework versions.|
|Universal Windows Platform||netcore50 is compatible. uap was computed. uap10.0 is compatible.|
This package has no dependencies.
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on XamlTreeDump: