[BUG] Firefox & Webkit not getting locator inside frame
See original GitHub issueContext:
- 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:
- Created a year ago
- Comments:9 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 failedframe.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! 😍
@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?