Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsTo find an element inside an iframe, identify its Puppeteer Frame and call frame.locator(selector). A locator created from page targets the page’s main document; one created from a frame searches that frame’s document.
Find the frame that contains the element
Puppeteer exposes the page’s frame tree through page.frames(), page.mainFrame() and each frame’s childFrames(). For a frame you can identify by URL, inspect the frame list and choose a stable URL condition that fits your page:
const frame = page.frames().find(candidate => candidate.url().includes('/embedded-form'));
if (!frame) throw new Error('Target frame not found');
The URL fragment above is only an example. A site may use a changing URL or several frames with similar URLs, so validate that the selected frame is the one containing the target element.
Select by the iframe element’s name or ID
If the iframe element has a useful name or id, inspect each non-main frame’s owning element with frame.frameElement(). This avoids relying on the deprecated Frame.name() method; the documented name value is calculated when the frame is created and does not update if the attribute changes later.
Recommended Free Tools
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
let targetFrame;
for (const candidate of page.frames()) {
if (candidate === page.mainFrame()) continue;
const element = await candidate.frameElement();
const name = await element.evaluate(el => el.getAttribute('name'));
if (name === 'payment-frame') {
targetFrame = candidate;
break;
}
}
if (!targetFrame) throw new Error('Payment frame not found');
Use the attribute that is stable on the page you are automating. Frames can be nested, so for nested iframes identify the child frame under its parent and use the innermost frame that contains the element. Frames may also attach, navigate or detach as the page changes; reacquire or validate the frame after relevant navigation or UI transitions.
Use a frame-scoped locator
Once you have the right Frame, create the locator from it. The selector is evaluated within that frame, and locator actions wait for the element to appear and satisfy action preconditions.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
await targetFrame.locator('input[name="email"]').fill('reader@example.com');
await targetFrame.locator('button[type="submit"]').click();
For a click, Puppeteer’s documented locator behavior checks that the element is in the viewport, visible and enabled, and that its bounding box is stable across two animation frames. This is useful when a frame loads asynchronously or its layout is still settling.
Use other Puppeteer selector forms
Frame.locator(selector) supports CSS selectors and Puppeteer selector syntax for text, accessibility role and name, XPath, and combinations that cross shadow roots. Choose a selector based on the target DOM and accessibility information.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
await targetFrame.locator('button.continue').click();
await targetFrame.locator('::-p-aria([name="Continue"][role="button"])').click();
Check the installed Puppeteer version if a method or selector syntax is unavailable. The official locator documentation was shown at version 25.9.0, while the Frame API and interaction guide were shown at 25.12.0; documentation versions can differ from the version in your project.
Choose between a locator and a one-off query
Use a locator when you want to interact with an element and benefit from automatic waiting and readiness checks. For a one-off lookup or custom evaluation, the frame’s query methods are available, but they do not provide locator interaction behavior by default.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
| Approach | Best fit | Behavior |
|---|---|---|
frame.locator(selector) |
Clicking, filling, or otherwise interacting with an element | Locator actions wait for element presence and relevant action conditions. |
frame.$(selector) |
Getting the first matching element handle | Returns an element handle or null; add your own handling for absence and timing. |
frame.$eval(selector, fn) |
Running a function against the first matching element | Evaluates the function on the first match; it does not provide locator action readiness checks. |
const handle = await targetFrame.$('h1');
if (!handle) throw new Error('Heading not found');
const text = await handle.evaluate(element => element.textContent);
Troubleshoot frame selection and locator failures
- The frame was not found: Check the current frame URLs and iframe attributes, and confirm the iframe has attached before searching. Do not assume a URL substring or frame order uniquely identifies it.
- The locator cannot find the element: Confirm the locator was created from the frame that owns the element, not from
pageor a parent frame. For nested iframes, select the child frame containing the element. - The frame reference stops working after navigation: A frame can navigate or detach as the page changes. Reacquire the frame from the current frame tree after the transition.
- A locator action does not proceed: Check that the selector matches an element in the frame and that the target is visible, enabled and stable enough for the requested action. Use a suitable selector from the frame’s actual DOM or accessibility tree.
- A documented method is unavailable: Check the Puppeteer version installed in the project against the API documentation for that method.
Or skip the browser setup
If your goal is a clean screenshot rather than interacting with a frame, ScreenshotNeo can capture a URL with one GET request. Its capture process accepts cookie or consent banners like a visitor and removes 60+ known consent platforms, newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers report the page verdict and whether the request was billed.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo also offers an MCP server for AI agents, including Claude, Cursor and other MCP clients, with tools for screenshots, page information and PDF capture. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Learn more at ScreenshotNeo.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Sign up for 1,000 free screenshots a month—no card required.
Quick Recap
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

