[dotnet] Unwrap element wrapper recursively by RenderMichael · Pull Request #15362 · SeleniumHQ/selenium
User description
Description
In many places, we only unwrap IWrapsElement once. This, however, has led to user issues.
This PR fixes that in a pain point from a user report. However, we should audit our usage of IWrapsElement and make sure this problem does not exist elsewhere.
There's also a lot of code duplication (or code that should be duplicated, but is implemented differently). We should centralize the element unwrapping logic.
Motivation and Context
Fixes #14513
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- I have read the contributing document.
- My change requires a change to the documentation.
- I have updated the documentation accordingly.
- I have added tests to cover my changes.
- All new and existing tests passed.
PR Type
Bug fix, Tests
Description
-
Fixed recursive unwrapping of
IWrapsElementto handle nested wrappers. -
Added error handling for self-referencing element wrappers.
-
Introduced new tests to validate double-wrapped element handling.
-
Added
WebElementWrapperclass for testing wrapped elements.
Changes walkthrough 📝
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Bug fix |
| ||||||
| Tests |
|
Need help?
Type /help how to ...in the comments thread for any questions about Qodo Merge usage.Check out the documentation for more information.