diff --git a/src/Appium.Net/Appium/AppiumCommandExecutionHelper.cs b/src/Appium.Net/Appium/AppiumCommandExecutionHelper.cs index a8f459d35..47ff9b662 100644 --- a/src/Appium.Net/Appium/AppiumCommandExecutionHelper.cs +++ b/src/Appium.Net/Appium/AppiumCommandExecutionHelper.cs @@ -94,7 +94,7 @@ public static void SetClipboard(IExecuteMethod executeMethod, ClipboardContentTy { case ClipboardContentType.Image: case ClipboardContentType.Url: - if (executeMethod.GetType().GetGenericTypeDefinition() == typeof(AndroidDriver)) + if (executeMethod.GetType() == typeof(AndroidDriver)) { throw new NotImplementedException( $"Android only supports contentType: {nameof(ClipboardContentType.PlainText)}"); @@ -118,7 +118,7 @@ public static string GetClipboard(IExecuteMethod executeMethod, ClipboardContent { case ClipboardContentType.Image: case ClipboardContentType.Url: - if (executeMethod.GetType().GetGenericTypeDefinition() == typeof(AndroidDriver)) + if (executeMethod.GetType() == typeof(AndroidDriver)) { throw new NotImplementedException( $"Android only supports contentType: {nameof(ClipboardContentType.PlainText)}");