diff --git a/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs b/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs index 319b961d8..8c6ec78a7 100644 --- a/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs +++ b/src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs @@ -72,7 +72,7 @@ public async Task ExecuteAsync(Command commandToExecute) } return result; } - catch (Exception e) + catch (Exception) { HandleCommandException(commandToExecute); diff --git a/src/Appium.Net/Appium/Windows/WindowsDriver.cs b/src/Appium.Net/Appium/Windows/WindowsDriver.cs index 49347f8b8..5b402d326 100644 --- a/src/Appium.Net/Appium/Windows/WindowsDriver.cs +++ b/src/Appium.Net/Appium/Windows/WindowsDriver.cs @@ -175,7 +175,7 @@ public override ReadOnlyCollection Contexts #endregion Context - public void HideKeyboard(string key) => + public new void HideKeyboard(string key) => AppiumCommandExecutionHelper.HideKeyboard(this, key); public void PressKeyCode(KeyEvent keyEvent) => throw new NotImplementedException(); diff --git a/test/integration/Android/WaitTests.cs b/test/integration/Android/WaitTests.cs index a00fabe11..e6ee72cd7 100644 --- a/test/integration/Android/WaitTests.cs +++ b/test/integration/Android/WaitTests.cs @@ -55,7 +55,7 @@ public void WebDriverWaitElementNotFoundTestCase() catch (Exception wx) { var excpetionType = wx.GetType(); - Assert.That(typeof(WebDriverTimeoutException), Is.EqualTo(excpetionType)); + Assert.That(excpetionType, Is.EqualTo(typeof(WebDriverTimeoutException))); } } @@ -76,7 +76,7 @@ public void WebDriverWaitIsWaitingTestCase() { stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; - Assert.That(_driverTimeOut.Seconds, Is.EqualTo(ts.Seconds)); + Assert.That(ts.Seconds, Is.EqualTo(_driverTimeOut.Seconds)); } } diff --git a/test/integration/IOS/ClipboardTest.cs b/test/integration/IOS/ClipboardTest.cs index bafaf703f..5a9d12696 100644 --- a/test/integration/IOS/ClipboardTest.cs +++ b/test/integration/IOS/ClipboardTest.cs @@ -63,6 +63,7 @@ public void WhenSetClipboardUrl_GetClipboardUrlShouldReturnUrl() } [Test] +#pragma warning disable CA1416 public void WhenSetClipboardContentTypeIsImage_GetClipboardShouldReturnEncodedBase64String() { var testImageBytes = _driver.GetScreenshot().AsByteArray; @@ -72,13 +73,16 @@ public void WhenSetClipboardContentTypeIsImage_GetClipboardShouldReturnEncodedBa Assert.That(() => Regex.IsMatch(_driver.GetClipboard(ClipboardContentType.Image), Base64RegexPattern, RegexOptions.Multiline), Is.True); } +#pragma warning restore CA1416 [Test] +#pragma warning disable CA1416 public void WhenClipboardHasNoImage_GetClipboardImageShouldReturnNull() { _driver.SetClipboardText(ClipboardTestString); Assert.That(() => _driver.GetClipboardImage(), Is.Null); } +#pragma warning restore CA1416 [Test] public void WhenClipboardIsEmpty_GetClipboardShouldReturnEmptyString() diff --git a/test/integration/ServerTests/StartingAppLocallyTest.cs b/test/integration/ServerTests/StartingAppLocallyTest.cs index 762d46b4a..432b2ef9b 100644 --- a/test/integration/ServerTests/StartingAppLocallyTest.cs +++ b/test/integration/ServerTests/StartingAppLocallyTest.cs @@ -148,7 +148,7 @@ public void CheckThatServiceIsNotRunWhenTheCreatingOfANewSessionIsFailed() { driver = new IOSDriver(service, capabilities); } - catch (Exception e) + catch (Exception) { Assert.That(!service.IsRunning); return; diff --git a/test/integration/Windows/StickyNotesTest.cs b/test/integration/Windows/StickyNotesTest.cs index d6b1c634c..b5760fc89 100644 --- a/test/integration/Windows/StickyNotesTest.cs +++ b/test/integration/Windows/StickyNotesTest.cs @@ -22,7 +22,7 @@ namespace Appium.Net.Integration.Tests.Windows { - public class StickyNotesTest + public abstract class StickyNotesTest { private const string StickyNotesAppId = @"Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe!App";