Skip to content

Comments

[dotnet] Upgrade examples to selenium 4.41#2588

Open
nvborisenko wants to merge 2 commits intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-4.41
Open

[dotnet] Upgrade examples to selenium 4.41#2588
nvborisenko wants to merge 2 commits intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-4.41

Conversation

@nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Feb 20, 2026

User description

Selenium v4.41 has small breaking changes for SeleniumManager and DriverFinder. Both have more robust public API.

Description

Motivation and Context

Actualize examples.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Enhancement


Description

  • Upgrade Selenium WebDriver NuGet packages from 4.38.0 to 4.41.0

  • Update DevTools API references from V142 to V145

  • Convert DriverFinder methods to async with new API

  • Add System.Threading.Tasks imports for async support


Diagram Walkthrough

flowchart LR
  A["Selenium 4.38.0"] -- "upgrade packages" --> B["Selenium 4.41.0"]
  C["DevTools V142"] -- "update API version" --> D["DevTools V145"]
  E["Sync DriverFinder methods"] -- "convert to async" --> F["Async DriverFinder methods"]
  B --> G["Updated Examples"]
  D --> G
  F --> G
Loading

File Walkthrough

Relevant files
Dependencies
SeleniumDocs.csproj
Upgrade Selenium NuGet packages to 4.41.0                               

examples/dotnet/SeleniumDocs/SeleniumDocs.csproj

  • Updated Selenium.Support package from 4.38.0 to 4.41.0
  • Updated Selenium.WebDriver package from 4.38.0 to 4.41.0
+2/-2     
Enhancement
NetworkTest.cs
Update DevTools API from V142 to V145                                       

examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs

  • Updated DevTools imports from V142 to V145
  • Updated GetVersionSpecificDomains calls to use V145 API
  • Updated EnableCommandSettings references to V145 namespace
+6/-6     
ChromeTest.cs
Convert Chrome browser location methods to async                 

examples/dotnet/SeleniumDocs/Browsers/ChromeTest.cs

  • Added System.Threading.Tasks import for async support
  • Converted SetBrowserLocation() method to async Task
  • Converted GetChromeLocation() to GetChromeLocationAsync() with async
    implementation
  • Updated DriverFinder.GetBrowserPath() to GetBrowserPathAsync() with
    await
+5/-4     
EdgeTest.cs
Convert Edge browser location methods to async                     

examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs

  • Added System.Threading.Tasks import for async support
  • Converted SetBrowserLocation() method to async Task
  • Converted GetEdgeLocation() to GetEdgeLocationAsync() with async
    implementation
  • Updated DriverFinder.GetBrowserPath() to GetBrowserPathAsync() with
    await
+5/-4     
FirefoxTest.cs
Convert Firefox browser location methods to async               

examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs

  • Added System.Threading.Tasks import for async support
  • Converted SetBinary() method to async Task
  • Converted GetFirefoxLocation() to GetFirefoxLocationAsync() with async
    implementation
  • Updated DriverFinder.GetBrowserPath() to GetBrowserPathAsync() with
    await
+5/-4     
ServiceTest.cs
Convert driver location method to async                                   

examples/dotnet/SeleniumDocs/Drivers/ServiceTest.cs

  • Added System.Threading.Tasks import for async support
  • Converted DriverLocation() method to async Task
  • Converted GetDriverLocation() to GetDriverLocationAsync() with async
    implementation
  • Updated DriverFinder.GetDriverPath() to GetDriverPathAsync() with
    await
+5/-4     
LoggingTest.cs
Update imports for Selenium 4.41 API                                         

examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs

  • Removed unused OpenQA.Selenium import
  • Added OpenQA.Selenium.Manager import for new API
+1/-1     

@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 4e2f512
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/699e36ca61f295000869f965
😎 Deploy Preview https://deploy-preview-2588--selenium-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 20, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 20, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Align DevTools startup version

Update the DevTools version in the Startup method from "142" to "145" to align
with the updated V145 imports.

examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs [17-20]

 public void Startup()
 {
-    StartDriver("142");
+    StartDriver("145");
 }

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical version mismatch between the driver initialization (142) and the DevTools API usage (V145), which would cause test failures.

High
  • Update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants