From 353785ea2bbf05e147a9abd5bae72c69d3f9f2a0 Mon Sep 17 00:00:00 2001 From: Dor-bl Date: Sun, 29 Dec 2024 07:20:16 +0200 Subject: [PATCH] refactor: remove IFindByIosUIAutomation interface and related iOS UI automation methods --- .../Interfaces/IFindByIosUIAutomation.cs | 35 ---------------- src/Appium.Net/Appium/MobileBy.cs | 41 ------------------- 2 files changed, 76 deletions(-) delete mode 100644 src/Appium.Net/Appium/Interfaces/IFindByIosUIAutomation.cs diff --git a/src/Appium.Net/Appium/Interfaces/IFindByIosUIAutomation.cs b/src/Appium.Net/Appium/Interfaces/IFindByIosUIAutomation.cs deleted file mode 100644 index 1d519e6d..00000000 --- a/src/Appium.Net/Appium/Interfaces/IFindByIosUIAutomation.cs +++ /dev/null @@ -1,35 +0,0 @@ -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//See the NOTICE file distributed with this work for additional -//information regarding copyright ownership. -//You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. - -using System.Collections.Generic; - -namespace OpenQA.Selenium.Appium.Interfaces -{ - public interface IFindByIosUIAutomation : IFindsByFluentSelector where W : IWebElement - { - /// - /// Finds the first of elements that match the Ios UIAutomation selector supplied - /// - /// an Ios UIAutomation selector - /// IWebElement object so that you can interact that object - W FindElementByIosUIAutomation(string selector); - - /// - /// Finds a list of elements that match the Ios UIAutomation selector supplied - /// - /// an Ios UIAutomation selector - /// IWebElement object so that you can interact that object - IReadOnlyCollection FindElementsByIosUIAutomation(string selector); - } -} \ No newline at end of file diff --git a/src/Appium.Net/Appium/MobileBy.cs b/src/Appium.Net/Appium/MobileBy.cs index ec879264..9a3dc69a 100644 --- a/src/Appium.Net/Appium/MobileBy.cs +++ b/src/Appium.Net/Appium/MobileBy.cs @@ -111,15 +111,6 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) => /// public static By AndroidViewMatcher(string selector) => new ByAndroidViewMatcher(selector); - /// - /// This method creates a strategy - /// that searches for elements using iOS UI automation. - /// - /// - /// The selector to use in finding the element. - /// - public static By IosUIAutomation(string selector) => new ByIosUIAutomation(selector); - public static By WindowsAutomation(string selector) => new ByWindowsAutomation(selector); public static By TizenAutomation(string selector) => new ByTizenAutomation(selector); @@ -279,38 +270,6 @@ public override string ToString() => $"ByAndroidViewMatcher({selector})"; } - /// - /// Finds element when the Ios UIAutomation selector has the specified value. - /// - /// - public class ByIosUIAutomation : MobileBy - { - /// - /// Initializes a new instance of the class. - /// - /// The selector to use in finding the element. - public ByIosUIAutomation(string selector) : base(selector, MobileSelector.iOSAutomatoion) - { - } - - public override IWebElement FindElement(ISearchContext context) - { - if (context is IFindByIosUIAutomation finder) - return finder.FindElementByIosUIAutomation(selector); - return base.FindElement(context); - } - - public override ReadOnlyCollection FindElements(ISearchContext context) - { - if (context is IFindByIosUIAutomation finder) - return finder.FindElementsByIosUIAutomation(selector).ToList().AsReadOnly(); - return base.FindElements(context); - } - - public override string ToString() => - $"ByIosUIAutomation({selector})"; - } - public class ByWindowsAutomation : MobileBy { ///