Skip to content

Commit

Permalink
refactor: remove IFindByIosUIAutomation interface and related iOS UI …
Browse files Browse the repository at this point in the history
…automation methods (#889)
  • Loading branch information
Dor-bl authored Dec 29, 2024
1 parent 4059036 commit 9035eea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 76 deletions.
35 changes: 0 additions & 35 deletions src/Appium.Net/Appium/Interfaces/IFindByIosUIAutomation.cs

This file was deleted.

41 changes: 0 additions & 41 deletions src/Appium.Net/Appium/MobileBy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) =>
/// <returns></returns>
public static By AndroidViewMatcher(string selector) => new ByAndroidViewMatcher(selector);

/// <summary>
/// This method creates a <see cref="By"/> strategy
/// that searches for elements using iOS UI automation.
/// <see href="https://developer.apple.com/library/tvos/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UIAutomation.html"/>
/// </summary>
/// <param name="selector">The selector to use in finding the element.</param>
/// <returns></returns>
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);
Expand Down Expand Up @@ -279,38 +270,6 @@ public override string ToString() =>
$"ByAndroidViewMatcher({selector})";
}

/// <summary>
/// Finds element when the Ios UIAutomation selector has the specified value.
/// <see href="https://developer.apple.com/library/tvos/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UIAutomation.html"/>
/// </summary>
public class ByIosUIAutomation : MobileBy
{
/// <summary>
/// Initializes a new instance of the <see cref="ByIosUIAutomation"/> class.
/// </summary>
/// <param name="selector">The selector to use in finding the element.</param>
public ByIosUIAutomation(string selector) : base(selector, MobileSelector.iOSAutomatoion)
{
}

public override IWebElement FindElement(ISearchContext context)
{
if (context is IFindByIosUIAutomation<IWebElement> finder)
return finder.FindElementByIosUIAutomation(selector);
return base.FindElement(context);
}

public override ReadOnlyCollection<IWebElement> FindElements(ISearchContext context)
{
if (context is IFindByIosUIAutomation<IWebElement> finder)
return finder.FindElementsByIosUIAutomation(selector).ToList().AsReadOnly();
return base.FindElements(context);
}

public override string ToString() =>
$"ByIosUIAutomation({selector})";
}

public class ByWindowsAutomation : MobileBy
{
/// <summary>
Expand Down

0 comments on commit 9035eea

Please sign in to comment.