-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Propagate async from navigation to tests #15308
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -359,7 +360,7 @@ public void ShouldTimeoutIfAPageTakesTooLongToLoadAfterClick() | |||
|
|||
try | |||
{ | |||
AssertPageLoadTimeoutIsEnforced(() => link.Click(), 2, 3); | |||
AssertPageLoadTimeoutIsEnforced(async () => link.Click(), 2, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will give a warning, but there is no ClickAsync
yet. I can add more code to clean it up, but is it worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sync
api is still under focus.
This PR can be a draft until v5 work begins; hopefully this PR is not stake by then. |
Instead of staling, I am thinking to create some "next-generation" branch, where we can put our work for
|
I think there is no difference between keeping this PR from being stale, and keeping a “next-generation” branch from being stale. If we want to do v5 work already, we can have feature flags. We can keep I like the idea of doing v5 work, but without a rough estimate on when v5 is coming (6 months? 3 years?) it may not be worth it to start now. |
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Propagates

async
from navigation, with the exception ofNavigationTests.cs
(the tests which explicitly validate the sync behavior), and theIWebDriver.Url
setter, because there are almost a thousand hits for this...Motivation and Context
Minimizing sync-over-async is pure goodness. Additionally, It is an eventual goal to make Selenium an Async library: #14067
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Transitioned test methods to asynchronous implementations.
Replaced synchronous navigation calls with asynchronous equivalents.
Updated test signatures to support async/await patterns.
Enhanced test reliability and alignment with modern .NET async practices.
Changes walkthrough 📝
9 files
Converted cookie-related tests to async methods.
Updated DevTools profiler tests to use async navigation.
Refactored JavaScript execution tests for async navigation.
Transitioned navigation tests to async methods.
Updated network interception tests to async navigation.
Refactored page loading tests for async navigation.
Updated print tests to initialize with async navigation.
Converted slow-loading page tests to async methods.
Refactored Firefox driver tests for async addon handling.