[dotnet] Make Selenium.WebDriver.Common.Tests compatible with .NET Framework#16769
[dotnet] Make Selenium.WebDriver.Common.Tests compatible with .NET Framework#16769RenderMichael wants to merge 8 commits intoSeleniumHQ:trunkfrom
Selenium.WebDriver.Common.Tests compatible with .NET Framework#16769Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
I like changes, but don't understand how to move further. Remote tests execution (RBE) supports only linux (net8.0?). Our CI doesn't execute tests against .NET Framework. |
User description
Contributes to #16115
💥 What does this PR do?
Ensure that we do not use .NET Core only APIs in the test suites.
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Replace .NET Core-only APIs with .NET Framework compatible alternatives
Add utility extension classes for cross-framework compatibility
Update test code to use reflection and conditional compilation
Fix test assertions for negative zero and datetime precision
Diagram Walkthrough
File Walkthrough
5 files
Replace double.NegativeZero with literalReplace UnsafeAccessor with reflection APIUse extension method for negative checkReplace OperatingSystem with utility wrapperReplace range operator with Substring method1 files
Fix DateTimeOffset constructor and assertion5 files
Add array reverse extension for compatibilityAdd IsNegative extension for double typeAdd cross-framework platform detection utilityAdd process kill extension methodAdd WaitAsync extension for pre-.NET 8