Fix compiler warnings CS0108 and CS0168 in Appium.Net#193
Fix compiler warnings CS0108 and CS0168 in Appium.Net#193
Conversation
- `WindowsDriver.cs`: Added `new` to `HideKeyboard(string)` to resolve CS0108 warning about hiding inherited member. - `AppiumCommandExecutor.cs`: Removed unused exception variable `e` to resolve CS0168 warning. Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
Resolves two C# compiler warnings in Appium.Net: CS0108 (member hiding) in WindowsDriver.HideKeyboard(string) and CS0168 (unused exception variable) in AppiumCommandExecutor.ExecuteAsync.
Changes:
- Add the
newkeyword toWindowsDriver.HideKeyboard(string)to explicitly mark intentional member hiding (CS0108). - Remove the unused exception variable from a
catch (Exception e)block (CS0168).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Appium.Net/Appium/Windows/WindowsDriver.cs |
Marks HideKeyboard(string) as intentionally hiding the inherited member via new. |
src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs |
Drops an unused exception variable in a catch block while preserving existing exception handling behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Added `new` to `HideKeyboard(string)` in `WindowsDriver.cs` (CS0108). - Removed unused exception variable `e` in `AppiumCommandExecutor.cs` and `StartingAppLocallyTest.cs` (CS0168). - Changed `StickyNotesTest` to be `abstract` (NUnit1034). - Swapped actual and expected values in `WaitTests.cs` (NUnit2007). - Suppressed `CA1416` in `ClipboardTest.cs` for image processing APIs. Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
This PR resolves compiler warnings
CS0108inWindowsDriver.csby explicitly specifying thenewkeyword for theHideKeyboard(string)method since it matches the base class signature, and resolvesCS0168inAppiumCommandExecutor.csby omitting the unused variableein a catch block. Code was verified to compile successfully with these warnings resolved.PR created automatically by Jules for task 11464783944611956544 started by @Dor-bl