Skip to content
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

Incorrect frame used after getting ownerFrame in checkHitTargetAt #1436

Open
2 tasks
ankur22 opened this issue Sep 23, 2024 · 0 comments
Open
2 tasks

Incorrect frame used after getting ownerFrame in checkHitTargetAt #1436

ankur22 opened this issue Sep 23, 2024 · 0 comments

Comments

@ankur22
Copy link
Collaborator

ankur22 commented Sep 23, 2024

What?

Looking at some code and i think this is incorrect, but it needs to be investigated with some working examples. frame is retrieved with h.ownerFrame, and later checked to see if frame != nil && frame.parentFrame != nil. In the if condition, the frame isn't used, instead h.frame. I would imagine that we should be working with the frame that was retrieved instead of h.frame.

Why?

This is confusing, and there are no comments or anything in the history to help us understand why we implemented it this way. Looking at Playwright, I can't find anywhere where they get the ownerFrame but then not use the result. This could be causing some unexpected incorrect behaviour when it comes to interacting with the website.

How?

We should:

  1. Create test scripts and integration tests that use the checkHitTargetAt in ElementHandle.
  2. Change the code so it works with frame instead of h.frame.
  3. See if the change helps in any way.

Tasks

Tasks

Related PR(s)/Issue(s)

Could be related to the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant