Skip to content

Conversation

@Classadi
Copy link

@Classadi Classadi commented Aug 14, 2025

User description

🔗 Related Issues

💥 What does this PR do?

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR Type

Other


Description

  • Add custom Visual Studio solution file for .NET WebDriver and DevTools projects

  • Configure Debug and Release build configurations for both projects


Diagram Walkthrough

flowchart LR
  A["Visual Studio Solution"] --> B["WebDriver Project"]
  A --> C["DevTools.VX Project"]
  B --> D["Debug/Release Config"]
  C --> D
Loading

File Walkthrough

Relevant files
Configuration changes
Selenium.Custom.sln
Add Visual Studio solution configuration                                 

dotnet/src/webdriver/DevTools/Selenium.Custom.sln

  • Create new Visual Studio solution file
  • Include WebDriver and DevTools.VX projects
  • Configure Debug and Release build platforms
  • Set up project dependencies and GUIDs
+26/-0   

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Aug 14, 2025
@qodo-merge-pro
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1234 - Partially compliant

Compliant requirements:

  • None

Non-compliant requirements:

  • Investigate and fix regression where clicking a link with JavaScript in href no longer triggers in Selenium 2.48.x on Firefox 42.
  • Provide a change that restores expected click behavior to trigger JS in href.
  • Verify behavior with Firefox driver.

Requires further human verification:

  • None

5678 - Partially compliant

Compliant requirements:

  • None

Non-compliant requirements:

  • Diagnose recurring "Error: ConnectFailure (Connection refused)" when instantiating multiple ChromeDriver instances.
  • Implement a fix or mitigation to prevent connection failures.
  • Add validation or documentation for proper driver lifecycle handling.

Requires further human verification:

  • None
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Build Paths

The project paths use backslashes and relative paths (e.g., src\WebDriver\WebDriver.csproj). Verify these match the repository layout and are correct relative to the .sln location to avoid broken solution references.

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
EndProject
Placeholder GUIDs

The solution uses placeholder tokens like {GUID-DRIVER} and {GUID-CDP}. These must be valid GUIDs matching the project GUIDs or CPS identifiers; otherwise the solution will not load projects properly in Visual Studio.

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
EndProject

Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {GUID-DRIVER}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {GUID-DRIVER}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {GUID-DRIVER}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {GUID-DRIVER}.Release|Any CPU.Build.0 = Release|Any CPU
        {GUID-CDP}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {GUID-CDP}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {GUID-CDP}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {GUID-CDP}.Release|Any CPU.Build.0 = Release|Any CPU
Configuration Completeness

Only Any CPU configurations are defined. If projects target multiple frameworks, platforms, or have custom configurations, missing mappings could cause build inconsistencies. Confirm if x86/x64 or additional configs are needed.

Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {GUID-DRIVER}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {GUID-DRIVER}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {GUID-DRIVER}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {GUID-DRIVER}.Release|Any CPU.Build.0 = Release|Any CPU
        {GUID-CDP}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {GUID-CDP}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {GUID-CDP}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {GUID-CDP}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection

@qodo-merge-pro
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use real project GUIDs

Replace the placeholder project GUIDs with actual stable GUIDs to avoid solution
load/build failures. These IDs must be valid GUIDs and match the ones inside the
corresponding .csproj files if pre-defined.

dotnet/src/webdriver/DevTools/Selenium.Custom.sln [6-9]

-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{8F8B2A7F-4A8B-4D4F-9C7D-2B0C1A6E9A11}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{1C6EE0E6-02E0-4E9E-9C0C-6B6C9B2B7C22}"
 EndProject
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that the project GUIDs are placeholders, which makes the solution file invalid and will cause build failures.

High
High-level
Avoid custom .sln duplication

Introducing a separate Selenium.Custom.sln risks configuration drift and breaks
established solution structure, making builds and tooling inconsistent with the
rest of the repo. Instead, integrate these projects into the existing .sln or
generate the solution via the current build system to keep a single source of
truth for configurations, GUIDs, and paths.

Examples:

dotnet/src/webdriver/DevTools/Selenium.Custom.sln [1-26]
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
EndProject


 ... (clipped 5 lines)

Solution Walkthrough:

Before:

// A new, separate solution file is added to the repository.
// dotnet/src/webdriver/DevTools/Selenium.Custom.sln

Microsoft Visual Studio Solution File...
Project("{...}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
Project("{...}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
...
Global
  ... // Configurations for only WebDriver and DevTools.VX
EndGlobal

After:

// The new projects are integrated into the main, existing solution file
// or a build script is updated to generate it.
// (Hypothetical existing file) dotnet/Selenium.sln

Microsoft Visual Studio Solution File...
Project("{...}") = "ExistingProject1", ...
...
Project("{...}") = "WebDriver", "src\WebDriver\WebDriver.csproj", "{GUID-DRIVER}"
Project("{...}") = "DevTools.VX", "src\DevTools\DevTools.VX.csproj", "{GUID-CDP}"
Global
  ... // Configurations for all projects, including the new ones
EndGlobal

Suggestion importance[1-10]: 8

__

Why: This suggestion correctly identifies a significant architectural issue, as adding a custom solution file instead of integrating with the existing build system can lead to configuration drift and future maintenance problems.

Medium
General
Align solution version metadata

Set an exact VisualStudioVersion that matches your tooling (e.g., 17.8.x) and
raise MinimumVisualStudioVersion if features require newer MSBuild. Mismatched
versions can cause unpredictable solution behavior and build incompatibilities.

dotnet/src/webdriver/DevTools/Selenium.Custom.sln [3-4]

-VisualStudioVersion = 17.0.0.0
-MinimumVisualStudioVersion = 10.0.40219.1
+VisualStudioVersion = 17.8.34112.27
+MinimumVisualStudioVersion = 17.0.0.0
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: This is a good practice suggestion to align Visual Studio version metadata, which can prevent potential tooling incompatibilities, but it is not a critical bug.

Low
  • More

@diemol diemol closed this Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants