Gu.Wpf.UiAutomation
Gu.Wpf.UiAutomation copied to clipboard
```xml net5.0-windows ```
System.TimeoutException : Did not find Process.MainWindowHandle, if startup is slow try with a longer timeout. ``` at Gu.Wpf.UiAutomation.Application.WaitForMainWindow(Process process, Nullable`1 waitTimeout) at Gu.Wpf.ToolTips.UiTests.MainWindowTests.ClickAllTabs() in \Gu.Wpf.ToolTips.UiTests\MainWindowTests.cs:line 14 ``` Getting this on...
```xaml ``` ```cs var textBox = window.FindTextBox("Min:") ``` Not sure if it should be `FindTextBoxByLabel()`
```cs dataGrid[0, 0] ``` Probably the same framework bug as with listview.
``` ImageAssert.OnFail = OnFail.SaveImageToTemp; ImageAssert.AreEqual(Properties.Resources.target_simple1, canvas); ```
FindChildAt(Index)is work,but SOMETIMES the index is not const in different app version, why not add the interface named FindEdit like “FindTextBox" ?
Not sure how it would work. Would be nice to have something that is more robust for stuff like aliasing differences on different windows versions, if that is a thing....
```cs using System.Collections.Generic; using System.Diagnostics; public class WpfTraceListener : TraceListener { private readonly List messages = new List(); public WpfTraceListener() { Register(PresentationTraceSources.AnimationSource); Register(PresentationTraceSources.DataBindingSource); Register(PresentationTraceSources.DocumentsSource); Register(PresentationTraceSources.DependencyPropertySource); Register(PresentationTraceSources.FreezableSource); Register(PresentationTraceSources.HwndHostSource); Register(PresentationTraceSources.MarkupSource); Register(PresentationTraceSources.NameScopeSource); Register(PresentationTraceSources.ResourceDictionarySource);...
Now it is ```cs public Window MainWindow => this.GetMainWindow(TimeSpan.FromSeconds(10)); ``` Which is not very nice and the time is probably too short for real applications. Static property is an alternative...