Skip to content

Fix compiler warnings CS0108 and CS0168 in Appium.Net#193

Closed
Dor-bl wants to merge 2 commits intomainfrom
fix/compiler-warnings-11464783944611956544
Closed

Fix compiler warnings CS0108 and CS0168 in Appium.Net#193
Dor-bl wants to merge 2 commits intomainfrom
fix/compiler-warnings-11464783944611956544

Conversation

@Dor-bl
Copy link
Owner

@Dor-bl Dor-bl commented Mar 8, 2026

This PR resolves compiler warnings CS0108 in WindowsDriver.cs by explicitly specifying the new keyword for the HideKeyboard(string) method since it matches the base class signature, and resolves CS0168 in AppiumCommandExecutor.cs by omitting the unused variable e in 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

- `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>
Copilot AI review requested due to automatic review settings March 8, 2026 00:09
@google-labs-jules
Copy link

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new keyword to WindowsDriver.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>
@Dor-bl Dor-bl closed this Mar 10, 2026
@Dor-bl Dor-bl deleted the fix/compiler-warnings-11464783944611956544 branch March 10, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants