public async Task OnGetElement_WithNonGenericReference_CanCastToGeneric() { // Arrange await using TestRecorder recorder = new(App); await Window.SetXamlContent(@"<StackPanel x:Name=""Panel"" />"); IVisualElement panel = await Window.GetElement("Panel"); //Act IVisualElement <StackPanel> stackPanel = panel.As <StackPanel>(); //Assert Assert.AreEqual("Panel", await stackPanel.GetName()); recorder.Success(); }