diff --git a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ImageTests/UnoSamples_Tests.Image.cs b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ImageTests/UnoSamples_Tests.Image.cs index 0c69e7cd7224..0d22270034b1 100644 --- a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ImageTests/UnoSamples_Tests.Image.cs +++ b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ImageTests/UnoSamples_Tests.Image.cs @@ -64,9 +64,7 @@ public void ImageStretch_None() void HasValidSize(string name) { - var element = _app.Marked(name); - _app.WaitForElement(element); - var rect = _app.Query(element).First().Rect; + var rect = _app.Query(q => q.All().Marked(name)).First().Rect; Assert.That(rect.Width != 0); Assert.That(rect.Height != 0); }