question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Firefox & Webkit not getting locator inside frame

See original GitHub issue

Context:

  • Playwright Version: 1.21.1
  • Operating System: Windows
  • Node.js version: 16.13.0
  • Browser: Firefox & Webkit

Code Snippet

const frameLocator = this.page.frameLocator('[id="card-number-element"] iframe');
const locator = frameLocator.locator('input[type=text][name=cardnumber]');
await locator.fill('some text'); // Fails ONLY in FIREFOX & WEBKIT

Describe the bug I have a test case in which I work with elements inside frames, and the test works in Chromium but not in Firefox or Webkit

When doing await page.frameLocator(frameSelector).locator(frameElementSelector).fill() (or any other action) it works in Chromium but not in Firefox Firefox getting next error: With the trace on this is the information I get from it:

Action was interrupted
locator.fill
TIME
wall time: 04/05/2022, 17:43:19
duration: Timed Out
PARAMETERS
selector: "[id="card-number-element"] iframe >> control=enter-frame >> input[type=text][name=cardnumber]"
strict: true
value: "4000 0000 0000 0002"
LOG
waiting for frame "[id="card-number-element"] iframe"
selector resolved to visible <iframe scrolling="no" frameborder="0" allowtransparency…></iframe>
waiting for selector "[id="card-number-element"] iframe >> control=enter-frame >> input[type=text][name=cardnumber]"

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kachkaevcommented, Aug 3, 2022

Thanks for your reply @dgozman! I tried crafting more or less reliable repro steps in https://github.com/blockprotocol/blockprotocol/pull/483 but failed so far. CI fails after adding --repeat-each 100 and focusing on just one test case. However, I can’t reproduce a trace in which I’ve see an input in a mini-screenshot, but a failed frame.locator("input").

This situation happened locally a couple of times, but the repro case was not reliable enough. I’ll keep watching CI results and update you here if I have any new findings.

Thanks again for your attention on this mystery! Playwright is awesome! 😍

0reactions
dgozmancommented, Aug 2, 2022

@kachkaev Perhaps there is a bug in snapshot code that we would be happy to debug. How can I run this test locally to reproduce the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

window.frames['iframe'].location is undefined in firefox
i m trying window.frames['iframe'].location , but i get the error that its undefined. Please tell me what is the exact solution or any ......
Read more >
top.frames is not working in firefox - Stack Overflow
WebKit has a known bug (see https://bugs.webkit.org/show_bug.cgi?id=11388 ) where it turns the iframe's id into the name of the window inside.
Read more >
Frame | Playwright - CukeTest
The method finds all elements matching the specified selector within the frame. See Working with selectors for more details. If no elements match...
Read more >
Content scripts do not inject into frames with no src ... - Monorail
Issue 76429: Content scripts do not inject into frames with no src because their ... There are probably one or bugs in both...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Note: Shared Tab Groups and syncing for Tab Groups, Website Settings, and Web Extensions are not enabled in this release. WebAssembly. Fixed error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found