Skip to content

[Bug]: Locator cannot locate iframe correctly!!! #2928

@Fly-Playgroud

Description

@Fly-Playgroud

Version

1.54.0

Steps to reproduce

import asyncio

from playwright import async_api


async def main():
    async with async_api.async_playwright() as playwright:
        browser = await playwright.chromium.launch(headless=False,executable_path=r"D:\xxx\chrome\137\chrome-win\chrome.exe")
        context = await browser.new_context()
        page = await context.new_page()
        await page.goto("https://www.bejson.com/jshtml_format/")
        await asyncio.sleep(100)
        frame = page.frame_locator("#aswift_0")


if __name__ == '__main__':
    asyncio.run(main())

Expected behavior

It can locate into correct iframe.Then I can evaluate in this frame.

Image

Actual behavior

But it located mian frame:

Image

Correct Frame:
Image

Additional context

No response

Environment

- Operating System: [Ubuntu 22.04]
- CPU: [arm64]
- Browser: [All, Chromium, Firefox, WebKit]
- Python Version: [3.12]
- Other info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy