Skip to content

Conversation

@RenderMichael
Copy link
Contributor

@RenderMichael RenderMichael commented Nov 26, 2025

User description

Some minor modernization

🔗 Related Issues

💥 What does this PR do?

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)

PR Type

Other


Description

  • Migrate .NET solution files from legacy .sln to modern .slnx format

  • Replace old Visual Studio solution format with simplified XML-based format

  • Update .gitattributes to reference .slnx instead of .sln

  • Modernize two solution files: main Selenium and DevTools generator


Diagram Walkthrough

flowchart LR
  oldSln["Legacy .sln files<br/>Selenium.sln<br/>DevToolsProtocolGenerator.sln"]
  newSlnx["Modern .slnx files<br/>Selenium.slnx<br/>DevToolsProtocolGenerator.slnx"]
  gitattr[".gitattributes<br/>updated reference"]
  oldSln -- "migrate to" --> newSlnx
  gitattr -- "updated to" --> newSlnx
Loading

File Walkthrough

Relevant files
Configuration changes
.gitattributes
Update solution file pattern reference                                     

.gitattributes

  • Updated file pattern from *.sln to *.slnx for merge strategy
    configuration
  • Maintains same merge and EOL settings for new solution file format
+1/-1     
Miscellaneous
Selenium.sln
Remove legacy solution file                                                           

dotnet/Selenium.sln

  • Removed legacy Visual Studio solution file (79 lines)
  • Contained project references and configuration for 10 projects
  • Replaced by new .slnx format file
+0/-79   
DevToolsProtocolGenerator.sln
Remove legacy DevTools solution file                                         

third_party/dotnet/devtools/DevToolsProtocolGenerator.sln

  • Removed legacy Visual Studio solution file (25 lines)
  • Contained single DevToolsGenerator project reference
  • Replaced by new .slnx format file
+0/-25   
Enhancement
Selenium.slnx
Add modern solution file format                                                   

dotnet/Selenium.slnx

  • Created new modern XML-based solution file
  • References all 10 projects in simplified format
  • Includes WebDriver, Support, and test projects for all browsers
+12/-0   
DevToolsProtocolGenerator.slnx
Add modern DevTools solution file                                               

third_party/dotnet/devtools/DevToolsProtocolGenerator.slnx

  • Created new modern XML-based solution file
  • References DevToolsGenerator project in simplified format
+3/-0     

@selenium-ci selenium-ci added C-dotnet .NET Bindings B-devtools Includes everything BiDi or Chrome DevTools related labels Nov 26, 2025
@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 26, 2025

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
🟡
🎫 #5678
🔴 Investigate and resolve repeated "Error: ConnectFailure (Connection refused)" when
instantiating multiple ChromeDriver instances on Ubuntu 16.04 with Selenium 3.9.0 and
ChromeDriver 2.35.
Ensure subsequent ChromeDriver instantiations do not produce connection failures after the
first successful instance.
Provide steps or code changes that address the networking/connection refusal issue in
ChromeDriver initialization.
🟡
🎫 #1234
🔴 Ensure WebDriver click() triggers JavaScript in link href in Firefox (regression from
2.47.1 to 2.48.x).
Provide fixes or tests validating alert is triggered when clicking links with javascript:
href.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
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: 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: Comprehensive Audit Trails

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

Status:
Out of scope: The PR only updates solution and attributes files with no runtime logic, so there are no
critical actions to log in the added lines.

Referred Code
*.slnx    text merge=union eol=crlf

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:
No error paths: The added files are solution metadata without executable logic, so there are no failure
points or edge cases to handle within the diff.

Referred Code
<Solution>
  <Project Path="src/support/Selenium.WebDriver.Support.csproj" />
  <Project Path="src/webdriver/Selenium.WebDriver.csproj" />
  <Project Path="test/chrome/Selenium.WebDriver.Chrome.Tests.csproj" />
  <Project Path="test/common/Selenium.WebDriver.Common.Tests.csproj" />
  <Project Path="test/edge/Selenium.WebDriver.Edge.Tests.csproj" />
  <Project Path="test/firefox/Selenium.WebDriver.Firefox.Tests.csproj" />
  <Project Path="test/ie/Selenium.WebDriver.IE.Tests.csproj" />
  <Project Path="test/remote/Selenium.WebDriver.Remote.Tests.csproj" />
  <Project Path="test/safari/Selenium.WebDriver.Safari.Tests.csproj" />
  <Project Path="test/support/Selenium.WebDriver.Support.Tests.csproj" />
</Solution>

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:
No inputs added: The changes only add solution references and do not introduce input handling code, so
validation concerns are not applicable in this diff.

Referred Code
<Solution>
  <Project Path="src/generator/DevToolsGenerator.csproj" />
</Solution>

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-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 26, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Consider implications of replacing .sln files

Replacing .sln files with .slnx removes explicit build configurations, which can
break development and CI build processes. It is crucial to evaluate the impact
of this change before merging.

Examples:

dotnet/Selenium.slnx [1-12]
<Solution>
  <Project Path="src/support/Selenium.WebDriver.Support.csproj" />
  <Project Path="src/webdriver/Selenium.WebDriver.csproj" />
  <Project Path="test/chrome/Selenium.WebDriver.Chrome.Tests.csproj" />
  <Project Path="test/common/Selenium.WebDriver.Common.Tests.csproj" />
  <Project Path="test/edge/Selenium.WebDriver.Edge.Tests.csproj" />
  <Project Path="test/firefox/Selenium.WebDriver.Firefox.Tests.csproj" />
  <Project Path="test/ie/Selenium.WebDriver.IE.Tests.csproj" />
  <Project Path="test/remote/Selenium.WebDriver.Remote.Tests.csproj" />
  <Project Path="test/safari/Selenium.WebDriver.Safari.Tests.csproj" />

 ... (clipped 2 lines)
third_party/dotnet/devtools/DevToolsProtocolGenerator.slnx [1-3]
<Solution>
  <Project Path="src/generator/DevToolsGenerator.csproj" />
</Solution>

Solution Walkthrough:

Before:

// dotnet/Selenium.sln
Microsoft Visual Studio Solution File...
Project("{...}") = "Selenium.WebDriver", "src\webdriver\Selenium.WebDriver.csproj", "{...}"
...
Global
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
    Debug|Any CPU = Debug|Any CPU
    Release|Any CPU = Release|Any CPU
  EndGlobalSection
  GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {...}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    ...
  EndGlobalSection
  ...
EndGlobal

After:

// dotnet/Selenium.slnx
<Solution>
  <Project Path="src/support/Selenium.WebDriver.Support.csproj" />
  <Project Path="src/webdriver/Selenium.WebDriver.csproj" />
  <Project Path="test/chrome/Selenium.WebDriver.Chrome.Tests.csproj" />
  ...
</Solution>
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical risk that replacing .sln with .slnx files removes explicit build configurations, which could break existing build and development workflows.

High
Learned
best practice
Add XML header and version

Add an XML declaration and optional version attribute to clarify encoding and
format version for tooling and maintainers.

dotnet/Selenium.slnx [1-12]

-<Solution>
+<?xml version="1.0" encoding="utf-8"?>
+<Solution Version="1">
   <Project Path="src/support/Selenium.WebDriver.Support.csproj" />
   <Project Path="src/webdriver/Selenium.WebDriver.csproj" />
   <Project Path="test/chrome/Selenium.WebDriver.Chrome.Tests.csproj" />
   <Project Path="test/common/Selenium.WebDriver.Common.Tests.csproj" />
   <Project Path="test/edge/Selenium.WebDriver.Edge.Tests.csproj" />
   <Project Path="test/firefox/Selenium.WebDriver.Firefox.Tests.csproj" />
   <Project Path="test/ie/Selenium.WebDriver.IE.Tests.csproj" />
   <Project Path="test/remote/Selenium.WebDriver.Remote.Tests.csproj" />
   <Project Path="test/safari/Selenium.WebDriver.Safari.Tests.csproj" />
   <Project Path="test/support/Selenium.WebDriver.Support.Tests.csproj" />
 </Solution>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Include a header and schema/version metadata in XML config files to document format and improve tool compatibility.

Low
  • Update

@RenderMichael
Copy link
Contributor Author

The way I have it here will replicate the "flat" solution approach, with all the projects one after the other.

We can also follow the folder structure, which I think is nice:
image

@nvborisenko What do you think, would you be comfortable working with this solution structure?

@RenderMichael

This comment was marked as resolved.

@nvborisenko
Copy link
Member

I prefer Selenium.csproj and Seleenium.Support.csproj in the root of sln. Tests in folder.

@nvborisenko
Copy link
Member

image

@YevgeniyShunevych your opinion?

@YevgeniyShunevych
Copy link
Contributor

I support the structure of the latest message. Looks better. No need in those many folders.

@nvborisenko
Copy link
Member

In any case core projects in the root, tests projects somewhere hidden. BTW related to #15536.

@RenderMichael
Copy link
Contributor Author

Implemented folder structure for tests (Visual Studio seems to put the tests folder at the top for me, for some reason).

image

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

Labels

B-devtools Includes everything BiDi or Chrome DevTools related C-dotnet .NET Bindings Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants