From 636089fcaa78e0e7779cbff5cb30ec684923d50b Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Fri, 31 Jan 2025 12:46:13 +0000 Subject: [PATCH] Revert "[Testing] Updated Appium.WebDriver to v7.0.0 (#27184)" This reverts commit a407b5fbb0afe0266c1a01f864143c98b488599d. --- .../Controls.TestCases.Android.Tests.csproj | 2 +- .../Controls.TestCases.Mac.Tests.csproj | 2 +- .../TestCases.Shared.Tests/Tests/Issues/Issue19214.cs | 1 + .../Tests/Issues/Issue19214_2.cs | 1 + .../Tests/Issues/Issue19214_3.cs | 1 + .../TestCases.Shared.Tests/Tests/Issues/Issue22715.cs | 1 + .../TestCases.Shared.Tests/Tests/KeyboardScrolling.cs | 1 + .../Controls.TestCases.WinUI.Tests.csproj | 2 +- .../Controls.TestCases.iOS.Tests.csproj | 2 +- .../src/UITest.Appium/Actions/AppiumDeviceActions.cs | 5 +---- .../src/UITest.Appium/Actions/AppiumScrollActions.cs | 2 ++ .../src/UITest.Appium/Actions/AppiumSliderActions.cs | 1 + .../src/UITest.Appium/Actions/AppiumSwipeActions.cs | 1 + src/TestUtils/src/UITest.Appium/HelperExtensions.cs | 10 ++-------- src/TestUtils/src/UITest.Appium/UITest.Appium.csproj | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj b/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj index a89c6f97fcf3..910898c5d03c 100644 --- a/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj +++ b/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Controls/tests/TestCases.Mac.Tests/Controls.TestCases.Mac.Tests.csproj b/src/Controls/tests/TestCases.Mac.Tests/Controls.TestCases.Mac.Tests.csproj index 8ee114f5a1b0..44fc8779d366 100644 --- a/src/Controls/tests/TestCases.Mac.Tests/Controls.TestCases.Mac.Tests.csproj +++ b/src/Controls/tests/TestCases.Mac.Tests/Controls.TestCases.Mac.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214.cs index 009a4bdcf175..7763aa3c861a 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using NUnit.Framework.Legacy; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_2.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_2.cs index 0942870f9fd0..9e9fb0c7d1c2 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_2.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_2.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using NUnit.Framework.Legacy; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_3.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_3.cs index a3fe8a707b6c..bf91f521a237 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_3.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19214_3.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using NUnit.Framework.Legacy; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs index 48ac8779999f..4049f8893d1a 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using NUnit.Framework.Legacy; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs index 7f4d38fc8c77..99b6f31592bc 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs @@ -2,6 +2,7 @@ using NUnit.Framework.Legacy; using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj b/src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj index 8d1ac79082e5..f89795c40fec 100644 --- a/src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj +++ b/src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj b/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj index f80f50c00039..8c2f4c2b2a77 100644 --- a/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj +++ b/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/TestUtils/src/UITest.Appium/Actions/AppiumDeviceActions.cs b/src/TestUtils/src/UITest.Appium/Actions/AppiumDeviceActions.cs index afd4ea7bbd98..bf1b9bff02c3 100644 --- a/src/TestUtils/src/UITest.Appium/Actions/AppiumDeviceActions.cs +++ b/src/TestUtils/src/UITest.Appium/Actions/AppiumDeviceActions.cs @@ -69,10 +69,7 @@ CommandResponse Unlock(IDictionary parameters) { if (_appiumApp.Driver is AndroidDriver androidDriver) { - string unlockType = (string)parameters["unlockType"]; - string unlockKey = (string)parameters["unlockKey"]; - - androidDriver.Unlock(unlockType, unlockKey); + androidDriver.Unlock(); return CommandResponse.SuccessEmptyResponse; } diff --git a/src/TestUtils/src/UITest.Appium/Actions/AppiumScrollActions.cs b/src/TestUtils/src/UITest.Appium/Actions/AppiumScrollActions.cs index c028ef0498d1..a2fe4d1ff96e 100644 --- a/src/TestUtils/src/UITest.Appium/Actions/AppiumScrollActions.cs +++ b/src/TestUtils/src/UITest.Appium/Actions/AppiumScrollActions.cs @@ -1,6 +1,8 @@ using OpenQA.Selenium; using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.Mac; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Core; diff --git a/src/TestUtils/src/UITest.Appium/Actions/AppiumSliderActions.cs b/src/TestUtils/src/UITest.Appium/Actions/AppiumSliderActions.cs index 5be700cd0942..f7566eb3a2a1 100644 --- a/src/TestUtils/src/UITest.Appium/Actions/AppiumSliderActions.cs +++ b/src/TestUtils/src/UITest.Appium/Actions/AppiumSliderActions.cs @@ -1,5 +1,6 @@ using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Core; diff --git a/src/TestUtils/src/UITest.Appium/Actions/AppiumSwipeActions.cs b/src/TestUtils/src/UITest.Appium/Actions/AppiumSwipeActions.cs index 09f0fe8a3698..2ee05d18d26d 100644 --- a/src/TestUtils/src/UITest.Appium/Actions/AppiumSwipeActions.cs +++ b/src/TestUtils/src/UITest.Appium/Actions/AppiumSwipeActions.cs @@ -1,5 +1,6 @@ using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Interactions; +using OpenQA.Selenium.Appium.MultiTouch; using OpenQA.Selenium.Interactions; using UITest.Core; diff --git a/src/TestUtils/src/UITest.Appium/HelperExtensions.cs b/src/TestUtils/src/UITest.Appium/HelperExtensions.cs index aee99d2483dc..c001cafae67d 100644 --- a/src/TestUtils/src/UITest.Appium/HelperExtensions.cs +++ b/src/TestUtils/src/UITest.Appium/HelperExtensions.cs @@ -1715,21 +1715,15 @@ public static void Lock(this IApp app) /// Functionality that's only available on Android and iOS. /// /// Represents the main gateway to interact with an app. - /// This capability supports the following possible values: pin, pinWithKeyEvent, password, pattern. - /// a valid pin (digits in range 0-9), password (latin characters) or pattern (treat the pattern pins similarly to numbers on a digital phone dial). /// Unlock is only supported on . - public static void Unlock(this IApp app, string unlockType = "", string unlockKey = "") + public static void Unlock(this IApp app) { if (app is not AppiumAndroidApp && app is not AppiumIOSApp) { throw new InvalidOperationException($"Unlock is only supported on AppiumAndroidApp and AppiumIOSApp"); } - app.CommandExecutor.Execute("unlock", new Dictionary() - { - { "unlockType", unlockType }, - { "unlockKey", unlockKey }, - }); + app.CommandExecutor.Execute("unlock", ImmutableDictionary.Empty); } /// diff --git a/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj b/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj index ea2061c87a42..08b934d89b4c 100644 --- a/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj +++ b/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj @@ -7,7 +7,7 @@ - +