Skip to content

[BUG] FrameLocator type is not exported #1362

@evan-dickinson

Description

@evan-dickinson

Context:

  • Playwright Version: 1.22
  • Operating System: Linux
  • Python version: 3.8.0
  • Browser: n/a
  • Extra: n/a

Code Snippet

from playwright.async_api import FrameLocator, Page


def locate_my_iframe(page: Page) -> FrameLocator:
    return page.frame_locator('some_complex_selector')

Describe the bug

Because the FrameLocator type isn't exported from playwright.async_api (nor from sync_api), I can't use it as the type of a return value or function parameter. The code above fails Mypy with the error Module 'playwright.async_api' has no attribute 'FrameLocator' [attr-defined].

FrameLocator is a documented part of the API, so it seems like it should be exported.

Metadata

Metadata

Assignees

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