Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove ByIosUIAutomation selector #889

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading