-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Unwrap element wrapper recursively #15362
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
Description
In many places, we only unwrap
IWrapsElementonce. 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
IWrapsElementand 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
Checklist
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 📝
PointerInputDevice.cs
Enhance `ConvertElement` to handle nested wrappersdotnet/src/webdriver/Interactions/PointerInputDevice.cs
ConvertElementto recursively unwrapIWrapsElement.WheelInputDevice.cs
Enhance `ConvertElement` to handle nested wrappersdotnet/src/webdriver/Interactions/WheelInputDevice.cs
ConvertElementto recursively unwrapIWrapsElement.BasicMouseInterfaceTest.cs
Add test for double-wrapped elements in mouse actionsdotnet/test/common/Interactions/BasicMouseInterfaceTest.cs
MoveToElementandClickfunctionality with wrapped elements.BasicWheelInterfaceTest.cs
Add test for double-wrapped elements in wheel actionsdotnet/test/common/Interactions/BasicWheelInterfaceTest.cs
ScrollToElementfunctionality with wrapped elements.WebElementWrapper.cs
Introduce `WebElementWrapper` for testingdotnet/test/common/WebElementWrapper.cs
WebElementWrapperclass implementingIWebElementandIWrapsElement.