Skip to content

[dotnet] [bidi] Remove last obsoleted Type helper in Input module#17652

Merged
nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:bidi-remove-type-helper
Jun 6, 2026
Merged

[dotnet] [bidi] Remove last obsoleted Type helper in Input module#17652
nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:bidi-remove-type-helper

Conversation

@nvborisenko
Copy link
Copy Markdown
Member

🔗 Related Issues

💥 What does this PR do?

This pull request makes a small change to the KeySourceActions record in SourceActions.cs, removing an obsolete helper method. The main change is:

  • Removed the obsolete Type(string text) helper method from the KeySourceActions record, as it is no longer recommended for use; developers should use KeyDownAction and KeyUpAction directly instead.

🔧 Implementation Notes

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Breaking change (fix or feature that would cause existing functionality to change)

@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Jun 6, 2026
@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Remove obsolete Type helper from KeySourceActions

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Removed obsolete Type(string text) helper method from KeySourceActions record
• Simplifies API by directing users to use KeyDownAction and KeyUpAction directly
• Cleans up deprecated code marked for removal
Diagram
flowchart LR
  A["KeySourceActions record"] -->|"Remove obsolete Type method"| B["Simplified API"]
  B -->|"Direct usage"| C["KeyDownAction and KeyUpAction"]

Loading

Grey Divider

File Changes

1. dotnet/src/webdriver/BiDi/Input/SourceActions.cs 🐞 Bug fix +1/-8

Remove obsolete Type helper method

• Removed the obsolete Type(string text) helper method from KeySourceActions record
• Simplified record definition by removing method body and curly braces
• Users are now directed to use KeyDownAction and KeyUpAction directly instead

dotnet/src/webdriver/BiDi/Input/SourceActions.cs


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review Bot commented Jun 6, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0)

Context used

Grey Divider


Action required

1. Removed KeySourceActions.Type() 📘 Rule violation ≡ Correctness
Description
The public helper method KeySourceActions.Type(string text) was removed, which is a breaking
change for any consumers still calling it. This violates the requirement to preserve public API
compatibility across upgrades (even if the method was previously marked obsolete).
Code

dotnet/src/webdriver/BiDi/Input/SourceActions.cs[L46-47]

-    [Obsolete("This helper method will be removed in a future version. Use KeyDownAction and KeyUpAction directly instead.")]
-    public KeySourceActions Type(string text) => this with
Evidence
PR Compliance IDs 3 and 13 require maintaining non-breaking public APIs. The updated
KeySourceActions record now ends at the base-type declaration with no Type(string) helper
present, confirming the public API surface was reduced.

AGENTS.md: Maintain API/ABI Compatibility for Public Interfaces
dotnet/src/webdriver/BiDi/Input/SourceActions.cs[41-45]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR removes the public method `KeySourceActions.Type(string text)`, which breaks existing consumer code that still calls it.

## Issue Context
Even though the method was previously deprecated, removing it is still an API-breaking change and conflicts with the project’s compatibility requirements.

## Fix Focus Areas
- dotnet/src/webdriver/BiDi/Input/SourceActions.cs[43-44]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread dotnet/src/webdriver/BiDi/Input/SourceActions.cs
@nvborisenko nvborisenko merged commit 1e0a052 into SeleniumHQ:trunk Jun 6, 2026
23 checks passed
@nvborisenko nvborisenko deleted the bidi-remove-type-helper branch June 6, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants