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

Add new FrameLocator.waitForFunction() method #26829

Closed
ajssd opened this issue Aug 31, 2023 · 1 comment
Closed

Add new FrameLocator.waitForFunction() method #26829

ajssd opened this issue Aug 31, 2023 · 1 comment

Comments

@ajssd
Copy link

ajssd commented Aug 31, 2023

Today we have contentFrame.waitForFunction() but this does not work with Frame Locators. What we would LIKE to do is this:

await locator.frameLocator('#my-frame').waitForFunction(() => { ... });

but what we have to do today is this:

const myFrame = await this.page.waitForSelector('#my-frame');
const myContentFrame = await myFrame.contentFrame();
await myContentFrame.waitForFunction(() => { ... });

Not the end of the world, but it's three async calls, and it takes away from a purely Locator-based approach that Playwright recommends.

Even something like this would get us halfway there:

const myContentFrame = await locator.frameLocator('#my-frame').contentFrame();
await myContentFrame.waitForFunction(() => { ... });

but there is no way to get the content frame from a frameLocator.

References:

@pavelfeldman
Copy link
Member

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

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

Successfully merging a pull request may close this issue.

3 participants