From 91fc1335a0bd0d97ddf3286eb912ef58462c0193 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 27 Jun 2022 23:00:52 +0200 Subject: [PATCH] Sigh, winappdriver. --- .../ElementExtensions.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/Avalonia.IntegrationTests.Appium/ElementExtensions.cs b/tests/Avalonia.IntegrationTests.Appium/ElementExtensions.cs index 16d37e4beb..4b361c6716 100644 --- a/tests/Avalonia.IntegrationTests.Appium/ElementExtensions.cs +++ b/tests/Avalonia.IntegrationTests.Appium/ElementExtensions.cs @@ -130,17 +130,10 @@ namespace Avalonia.IntegrationTests.Appium public static void SendClick(this AppiumWebElement element) { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - element.Click(); - } - else - { - // The Click() method seems to correspond to accessibilityPerformPress on macOS but certain controls - // such as list items don't support this action, so instead simulate a physical click as VoiceOver - // does. - new Actions(element.WrappedDriver).MoveToElement(element).Click().Perform(); - } + // The Click() method seems to correspond to accessibilityPerformPress on macOS but certain controls + // such as list items don't support this action, so instead simulate a physical click as VoiceOver + // does. On Windows, Click() seems to fail with the WindowState checkbox for some reason. + new Actions(element.WrappedDriver).MoveToElement(element).Click().Perform(); } public static void MovePointerOver(this AppiumWebElement element)