From c740e5074d2ce459b60b8d673655f52b008ae5e4 Mon Sep 17 00:00:00 2001 From: dragos losonti Date: Tue, 13 Feb 2024 08:59:41 +0200 Subject: [PATCH] chore: fixes some xml comments (#733) --- .../Appium/Android/AndroidDriver.cs | 2 +- .../Appium/Android/Interfaces/IPushesFiles.cs | 4 +-- src/Appium.Net/Appium/AppiumCommand.cs | 1 - .../Interfaces/IFindsByFluentSelector.cs | 2 +- .../Appium/Interfaces/IHidesKeyboard.cs | 2 +- .../Appium/Interfaces/IInteractsWithApps.cs | 6 ++-- .../Appium/Interfaces/INetworkActions.cs | 3 +- .../Appium/Interfaces/ITouchAction.cs | 11 +++--- src/Appium.Net/Appium/MobileBy.cs | 36 +++++++++---------- .../Appium/MultiAction/MultiAction.cs | 4 +-- .../Appium/MultiAction/TouchAction.cs | 27 +++++++------- .../Appium/Service/AppiumCommandExecutor.cs | 2 +- src/Appium.Net/Appium/iOS/IOSDriver.cs | 4 +-- .../ServerTests/StartingAppLocallyTest.cs | 2 +- 14 files changed, 51 insertions(+), 55 deletions(-) diff --git a/src/Appium.Net/Appium/Android/AndroidDriver.cs b/src/Appium.Net/Appium/Android/AndroidDriver.cs index 49f55253..aa06234c 100644 --- a/src/Appium.Net/Appium/Android/AndroidDriver.cs +++ b/src/Appium.Net/Appium/Android/AndroidDriver.cs @@ -201,7 +201,7 @@ public ConnectionType ConnectionType #endregion Connection Type - #region Device Kesys + #region Device Keys public void PressKeyCode(int keyCode, int metastate = -1) => AppiumCommandExecutionHelper.PressKeyCode(this, keyCode, metastate); diff --git a/src/Appium.Net/Appium/Android/Interfaces/IPushesFiles.cs b/src/Appium.Net/Appium/Android/Interfaces/IPushesFiles.cs index bb71b7cc..98fa1a5e 100644 --- a/src/Appium.Net/Appium/Android/Interfaces/IPushesFiles.cs +++ b/src/Appium.Net/Appium/Android/Interfaces/IPushesFiles.cs @@ -24,7 +24,7 @@ public interface IPushesFiles : IInteractsWithFiles /// /// Path to file to write data to on remote device /// A string to write to remote device - void PushFile(string pathOnDevice, string base64Data); + void PushFile(string pathOnDevice, string stringData); /// /// Saves base64 encoded data as a file on the remote mobile device. @@ -37,7 +37,7 @@ public interface IPushesFiles : IInteractsWithFiles /// Saves given file as a file on the remote mobile device. /// /// Path to file to write data to on remote device - /// A file to write to remote device + /// A file to write to remote device void PushFile(string pathOnDevice, FileInfo file); } } \ No newline at end of file diff --git a/src/Appium.Net/Appium/AppiumCommand.cs b/src/Appium.Net/Appium/AppiumCommand.cs index 612b087d..35b3879d 100644 --- a/src/Appium.Net/Appium/AppiumCommand.cs +++ b/src/Appium.Net/Appium/AppiumCommand.cs @@ -273,7 +273,6 @@ internal static ICommandExecutor Merge(ICommandExecutor repo) /// type of command (get/post/delete) /// Command /// api endpoint - /// public AppiumCommand(string commandType, string command, string apiEndpoint) { CommandType = commandType; diff --git a/src/Appium.Net/Appium/Interfaces/IFindsByFluentSelector.cs b/src/Appium.Net/Appium/Interfaces/IFindsByFluentSelector.cs index 9b08cf26..63cbaa8c 100644 --- a/src/Appium.Net/Appium/Interfaces/IFindsByFluentSelector.cs +++ b/src/Appium.Net/Appium/Interfaces/IFindsByFluentSelector.cs @@ -34,6 +34,6 @@ public interface IFindsByFluentSelector where W : IWebElement /// is a string selector /// is a value of the given selector /// a list of elements - IReadOnlyCollection FindElements(string selector, string value); + IReadOnlyCollection FindElements(string by, string value); } } \ No newline at end of file diff --git a/src/Appium.Net/Appium/Interfaces/IHidesKeyboard.cs b/src/Appium.Net/Appium/Interfaces/IHidesKeyboard.cs index 02b45b18..b8b71046 100644 --- a/src/Appium.Net/Appium/Interfaces/IHidesKeyboard.cs +++ b/src/Appium.Net/Appium/Interfaces/IHidesKeyboard.cs @@ -39,7 +39,7 @@ public interface IHidesKeyboard /// /// Whether or not the soft keyboard is shown /// - /// if keyboard is shown, if not. + /// if keyboard is shown, if not. bool IsKeyboardShown(); } } \ No newline at end of file diff --git a/src/Appium.Net/Appium/Interfaces/IInteractsWithApps.cs b/src/Appium.Net/Appium/Interfaces/IInteractsWithApps.cs index 9f1a0c68..ee06da43 100644 --- a/src/Appium.Net/Appium/Interfaces/IInteractsWithApps.cs +++ b/src/Appium.Net/Appium/Interfaces/IInteractsWithApps.cs @@ -33,7 +33,7 @@ public interface IInteractsWithApps : IExecuteMethod /// /// Checks If an App Is Installed. /// - /// a string containing the bundle id. + /// a string containing the bundle id. /// a boolean indicating if the app is installed. bool IsAppInstalled(string bundleId); @@ -51,13 +51,13 @@ public interface IInteractsWithApps : IExecuteMethod /// /// Removes an App. /// - /// a string containing the id of the app. + /// a string containing the id of the app. void RemoveApp(string appId); /// /// Activates the given app by moving to the foreground if it is running in the background or starting it if it is not running yet. /// - /// a string containing the id of the app. + /// a string containing the id of the app. void ActivateApp(string appId); /// diff --git a/src/Appium.Net/Appium/Interfaces/INetworkActions.cs b/src/Appium.Net/Appium/Interfaces/INetworkActions.cs index 45ff6ccc..6fe8e623 100644 --- a/src/Appium.Net/Appium/Interfaces/INetworkActions.cs +++ b/src/Appium.Net/Appium/Interfaces/INetworkActions.cs @@ -28,7 +28,7 @@ public interface INetworkActions /// Switch the state of data service (Emulator Only) /// (For Android) This API does not work for Android API level 21+ /// because it requires system or carrier privileged permission, - /// and Android <= 21 does not support granting permissions. + /// and Android <= 21 does not support granting permissions. /// void ToggleData(); @@ -59,7 +59,6 @@ public interface INetworkActions /// /// Sets GSM signal strength (Emulator only) /// - /// /// void SetGsmSignalStrength(GsmSignalStrength gsmSignalStrength); diff --git a/src/Appium.Net/Appium/Interfaces/ITouchAction.cs b/src/Appium.Net/Appium/Interfaces/ITouchAction.cs index 9a59884a..122d69bc 100644 --- a/src/Appium.Net/Appium/Interfaces/ITouchAction.cs +++ b/src/Appium.Net/Appium/Interfaces/ITouchAction.cs @@ -19,20 +19,19 @@ namespace OpenQA.Selenium.Appium.Interfaces public interface ITouchAction { /// - /// Press at the specified location in the element until the context menu appears. + /// Press at the specified location in the element until the context menu appears. /// /// The target element. /// The x coordinate relative to the element. /// The y coordinate relative to the element. /// A self-reference to this . - ITouchAction LongPress(IWebElement el, double? x = null, double? y = null); + ITouchAction LongPress(IWebElement element, double? x = null, double? y = null); /// - /// Press at the specified location until the context menu appears. + /// Long press at the specified location given by the coordinates. /// - /// The target element. - /// The x coordinate relative to the element. - /// The y coordinate relative to the element. + /// The x absolute coordinate. + /// The y absolute coordinate. /// A self-reference to this . ITouchAction LongPress(double x, double y); diff --git a/src/Appium.Net/Appium/MobileBy.cs b/src/Appium.Net/Appium/MobileBy.cs index a6220f50..a770c027 100644 --- a/src/Appium.Net/Appium/MobileBy.cs +++ b/src/Appium.Net/Appium/MobileBy.cs @@ -65,10 +65,10 @@ public override ReadOnlyCollection FindElements(ISearchContext cont /// /// This method creates a strategy /// that searches for elements by accessibility id - /// About Android accessibility - /// - /// About iOS accessibility - /// + ///
About Android accessibility
+ /// + ///
About iOS accessibility
+ /// ///
/// The selector to use in finding the element. /// @@ -77,7 +77,7 @@ public override ReadOnlyCollection FindElements(ISearchContext cont /// /// This method creates a strategy /// that searches for elements using Android UI automation framework. - /// + /// /// /// The selector to use in finding the element. /// @@ -86,7 +86,7 @@ public override ReadOnlyCollection FindElements(ISearchContext cont /// /// This method creates a strategy /// that searches for elements using Android UI automation framework. - /// + /// /// /// The selector to use in finding the element. /// @@ -96,7 +96,7 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) => /// /// This method creates a strategy /// that searches for elements using Espresso's Data Matcher. - /// + /// /// /// The selector to use in finding the element. /// @@ -105,7 +105,7 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) => /// /// This method creates a strategy /// that searches for elements using Espresso's View Matcher. - /// + /// /// /// The selector to use in finding the element. /// @@ -114,7 +114,7 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) => /// /// This method creates a strategy /// that searches for elements using iOS UI automation. - /// + /// /// /// The selector to use in finding the element. /// @@ -141,10 +141,10 @@ public static By AndroidUIAutomator(IUiAutomatorStatementBuilder selector) => /// /// Finds element when the Accessibility Id selector has the specified value. - /// About Android accessibility - /// - /// About iOS accessibility - /// + ///
About Android accessibility
+ /// + ///
About iOS accessibility
+ /// ///
public class ByAccessibilityId : MobileBy { @@ -176,7 +176,7 @@ public override string ToString() => /// /// Finds element when the Android UIAutomator selector has the specified value. - /// + /// /// public class ByAndroidUIAutomator : MobileBy { @@ -217,7 +217,7 @@ public override string ToString() => /// /// Finds element when the Espresso's Data Matcher selector has the specified value. - /// + /// /// public class ByAndroidDataMatcher : MobileBy { @@ -249,7 +249,7 @@ public override string ToString() => /// /// Finds element when the Espresso's View Matcher selector has the specified value. - /// + /// /// public class ByAndroidViewMatcher : MobileBy { @@ -281,7 +281,7 @@ public override string ToString() => /// /// Finds element when the Ios UIAutomation selector has the specified value. - /// + /// /// public class ByIosUIAutomation : MobileBy { @@ -428,7 +428,7 @@ public class ByImage : MobileBy /// /// Initializes a new instance of the class. /// - /// base64-encoded template image string. + /// base64-encoded template image string. public ByImage(string selector) : base(selector, MobileSelector.Image) { } diff --git a/src/Appium.Net/Appium/MultiAction/MultiAction.cs b/src/Appium.Net/Appium/MultiAction/MultiAction.cs index cfaa847b..3d6c3e71 100644 --- a/src/Appium.Net/Appium/MultiAction/MultiAction.cs +++ b/src/Appium.Net/Appium/MultiAction/MultiAction.cs @@ -26,9 +26,9 @@ public class MultiAction : IMultiAction private IPerformsTouchActions TouchActionPerformer; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The the driver to be used. + /// The the driver to be used. public MultiAction(IPerformsTouchActions touchActionPerformer) { this.TouchActionPerformer = touchActionPerformer; diff --git a/src/Appium.Net/Appium/MultiAction/TouchAction.cs b/src/Appium.Net/Appium/MultiAction/TouchAction.cs index 334b15d5..c128d965 100644 --- a/src/Appium.Net/Appium/MultiAction/TouchAction.cs +++ b/src/Appium.Net/Appium/MultiAction/TouchAction.cs @@ -97,8 +97,8 @@ public TouchAction(IPerformsTouchActions touchActionPerformer) /// Press at the specified location in the element until the context menu appears. ///
/// The target element. - /// The x coordinate relative to the element. - /// The y coordinate relative to the element. + /// The x coordinate relative to the element. + /// The y coordinate relative to the element. /// A self-reference to this . public ITouchAction LongPress(IWebElement element, double? x = null, double? y = null) { @@ -112,11 +112,10 @@ public ITouchAction LongPress(IWebElement element, double? x = null, double? y = } /// - /// Press at the specified location in the element until the context menu appears. + /// Long press at the specified location described by the coordinates. /// - /// The target element. - /// The x coordinate relative to the element. - /// The y coordinate relative to the element. + /// The x absolute coordinate. + /// The y absolute coordinate. /// A self-reference to this . public ITouchAction LongPress(double x, double y) { @@ -132,8 +131,8 @@ public ITouchAction LongPress(double x, double y) /// Move to the specified location in the element. /// /// The target element. - /// The x coordinate relative to the element. - /// The y coordinate relative to the element. + /// The x coordinate relative to the element. + /// The y coordinate relative to the element. /// A self-reference to this . public ITouchAction MoveTo(IWebElement element, double? x = null, double? y = null) { @@ -149,8 +148,8 @@ public ITouchAction MoveTo(IWebElement element, double? x = null, double? y = nu /// /// Move to the specified location. /// - /// The x coordinate. - /// The y coordinate. + /// The x coordinate. + /// The y coordinate. /// A self-reference to this . public ITouchAction MoveTo(double x, double y) { @@ -166,8 +165,8 @@ public ITouchAction MoveTo(double x, double y) /// Press at the specified location in the element. /// /// The target element. - /// The x coordinate relative to the element. - /// The y coordinate relative to the element. + /// The x coordinate relative to the element. + /// The y coordinate relative to the element. /// A self-reference to this . public ITouchAction Press(IWebElement element, double? x = null, double? y = null) { @@ -183,8 +182,8 @@ public ITouchAction Press(IWebElement element, double? x = null, double? y = nul /// /// Press at the specified location. /// - /// The x coordinate. - /// The y coordinate. + /// The x coordinate. + /// The y coordinate. /// A self-reference to this . public ITouchAction Press(double x, double y) { diff --git a/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs b/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs index e06a3374..fbc2f557 100644 --- a/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs +++ b/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs @@ -67,7 +67,7 @@ public Response Execute(Command commandToExecute) } return result; } - catch (Exception e) + catch (Exception) { HandleCommandException(commandToExecute); diff --git a/src/Appium.Net/Appium/iOS/IOSDriver.cs b/src/Appium.Net/Appium/iOS/IOSDriver.cs index b06c1a8d..aa4b12e3 100644 --- a/src/Appium.Net/Appium/iOS/IOSDriver.cs +++ b/src/Appium.Net/Appium/iOS/IOSDriver.cs @@ -81,7 +81,7 @@ public IOSDriver(AppiumServiceBuilder builder, DriverOptions driverOptions, Time /// Initializes a new instance of the IOSDriver class using the specified remote address and Appium options /// /// URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4723/wd/hub). - /// An object containing the Appium options. + /// An object containing the Appium options. public IOSDriver(Uri remoteAddress, DriverOptions driverOptions) : base(remoteAddress, SetPlatformToCapabilities(driverOptions, Platform)) { @@ -101,7 +101,7 @@ public IOSDriver(AppiumLocalService service, DriverOptions driverOptions) /// Initializes a new instance of the IOSDriver class using the specified remote address, Appium options, and command timeout. /// /// URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4723/wd/hub). - /// An object containing the Appium options. + /// An object containing the Appium options. /// The maximum amount of time to wait for each command. public IOSDriver(Uri remoteAddress, DriverOptions driverOptions, TimeSpan commandTimeout) : base(remoteAddress, SetPlatformToCapabilities(driverOptions, Platform), commandTimeout) diff --git a/test/integration/ServerTests/StartingAppLocallyTest.cs b/test/integration/ServerTests/StartingAppLocallyTest.cs index 9a94e667..c200c0c2 100644 --- a/test/integration/ServerTests/StartingAppLocallyTest.cs +++ b/test/integration/ServerTests/StartingAppLocallyTest.cs @@ -149,7 +149,7 @@ public void CheckThatServiceIsNotRunWhenTheCreatingOfANewSessionIsFailed() { driver = new IOSDriver(service, capabilities); } - catch (Exception e) + catch (Exception) { Assert.That(!service.IsRunning); return;