-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Add WindowSwitcher class #16359
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
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:
|
|
Thank you, @arnonax-tr for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
ca28435 to
719b13f
Compare
|
Regarding the 2 other PR Code Suggestions, I don't think they're relevant:
If you're using the
I don't think we should swallow a |
|
Any update? @nvborisenko can you look at it? |
User description
💥 What does this PR do?
Adds a helper class
WindowSwitcherand an extension methodWithWindowOpenedBythat facilitates switching between windows.For example:
🔄 Types of changes
PR Type
Enhancement
Description
Add
WindowSwitcherclass for managing browser window switchingAdd
WithWindowOpenedByextension method for WebDriverInclude comprehensive unit tests for window switching functionality
Provide fluent API for handling popup windows
Diagram Walkthrough
File Walkthrough
WebDriverExtensions.cs
Add window switching extension methoddotnet/src/support/Extensions/WebDriverExtensions.cs
WithWindowOpenedByextension method for IWebDriverOpenQA.Selenium.Support.UInamespaceWindowSwitcher.cs
New WindowSwitcher class implementationdotnet/src/support/UI/WindowSwitcher.cs
WindowSwitcherclass with window management functionalityDo()method for safe window switching with automatic returnSwitchToNewWindow()andSwitchToOriginalWindow()methodsWindowSwitcherTest.cs
Unit tests for WindowSwitcherdotnet/test/support/UI/WindowSwitcherTest.cs